-
Notifications
You must be signed in to change notification settings - Fork 529
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
Querytee: Add metric to measure relative backend latency #7782
Conversation
This metric gives us a measurement of how individual queries compare between two backends in terms of latency (or duration).
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.
Thanks for working on this.
It'd be good to add the proportional latency difference as well - a request being 1s slower is interesting, but knowing whether that's a 1% change or a 100% change would be useful as well.
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 metric gives us a measurement of how individual queries compare between two backends in terms of latency (or duration).
Why do we need a new metric? Can't we just solve this "problem" at PromQL level, with a query?
We currently measure the By tracking with a new metric, we can see on this individual histogram the number of times one backend is faster than the other (and by how much) depending if the bucket is positive or negative. |
Also test the proportional metric
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.
Overall LGTM, modulo comment on test changes.
Could you please add a changelog entry?
Co-authored-by: Charles Korn <charleskorn@users.noreply.github.com>
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.
Thanks for updating the metric name.
I think consistency with other metric descriptions is probably preferable to more clarity.
} | ||
} | ||
|
||
func filterMetrics(metrics []*dto.MetricFamily, names []string) []*dto.MetricFamily { |
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.
[nit] This method is only ever used with one value for name
- might be able to simplify this and the test that calls it.
This metric gives us a measurement of how individual queries compare between two backends in terms of latency (or duration).
What this PR does
Which issue(s) this PR fixes or relates to
Fixes #
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.