Skip to content
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

Merged
merged 2 commits into from
Oct 21, 2022
Merged

Add timestamp filter #627

merged 2 commits into from
Oct 21, 2022

Conversation

XAMPPRocky
Copy link
Collaborator

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.

Copy link
Contributor

@markmandel markmandel left a 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 👍🏻

@XAMPPRocky XAMPPRocky force-pushed the ep/metric-filter branch 2 times, most recently from e826804 to 7172403 Compare October 21, 2022 09:20

let now = Utc::now();
let seconds = now.signed_duration_since(datetime).num_seconds();
self.metric(direction_label).observe(seconds as f64);
Copy link
Contributor

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?

Copy link
Collaborator Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sense! 👍🏻

@quilkin-bot
Copy link
Collaborator

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:

git fetch git@github.com:googleforgames/quilkin.git pull/627/head:pr_627 && git checkout pr_627
cargo build

@markmandel markmandel merged commit d70637a into main Oct 21, 2022
markmandel added a commit to markmandel/quilkin that referenced this pull request Oct 21, 2022
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!
@markmandel markmandel deleted the ep/metric-filter branch October 21, 2022 20:58
markmandel added a commit that referenced this pull request Oct 21, 2022
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!
@markmandel markmandel added kind/feature New feature or request area/user-experience Pertaining to developers trying to use Quilkin, e.g. cli interface, configuration, etc labels Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/user-experience Pertaining to developers trying to use Quilkin, e.g. cli interface, configuration, etc kind/feature New feature or request size/m
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants