-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add timestamp filter #627
Add timestamp filter #627
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome 😃 only thing missing is some docs please 👍🏻
e826804
to
7172403
Compare
7172403
to
18c6f41
Compare
|
||
let now = Utc::now(); | ||
let seconds = now.signed_duration_since(datetime).num_seconds(); | ||
self.metric(direction_label).observe(seconds as f64); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(non blocking question): Does it make sense to combine this with maxmind information somehow? Either in the label or in tracing information?
Just thinking about tracking ping round trip times using this filter, and wanting some granularity on where geographically people are at?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to combine this with maxmind information somehow? Either in the label or in tracing information?
Yes it does, I'm going to try to find a way to do purely through grafana before trying to integrate it directly in code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sense! 👍🏻
Build Succeeded 🥳 Build Id: 3851df97-1abb-420a-aff9-8f51aa3ca08d The following development images have been built, and will exist for the next 30 days: To build this version:
|
As soon as I hit merge on googleforgames#627 I realised that the docs weren't linked and I missed it on review! 🤦🏻♂️ So here are the fixes!
As soon as I hit merge on #627 I realised that the docs weren't linked and I missed it on review! 🤦🏻♂️ So here are the fixes!
This adds a new timestamp filter that reads in a metadata value as a unix timestamp, and then observes the duration between then and now in a histogram metric that's keyed by the direction and metadata key. This is mainly useful in combination with things like
Capture
which then allows you to parse timestamps from packets.