-
Notifications
You must be signed in to change notification settings - Fork 237
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
Counter with histogram suffix will clash with histogram #461
Counter with histogram suffix will clash with histogram #461
Conversation
Signed-off-by: Pedro Tanaka <pedro.stanaka@gmail.com>
…stogram Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com>
Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com>
Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.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.
This is great, thank you! Do we need the same check for gauges?
Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com>
Good catch. Added a few more test cases and I am checking now for gauges as well. |
Signed-off-by: Pedro Tanaka <pedro.tanaka@shopify.com>
From what I see, the rest should be covered. |
Just checking, anything else needed here @matthiasr ? |
Sorry, my bad, I'm underwater with work. Will review as soon as possible. |
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.
Thank you!
Summary
While running the exporter in production a colegue faced an error when a counter clashes with a previously collected histogram.
I managed to reproduce the bug with some tests cases and this PR fixes the problem.
Bug description
The problem can be reproduced in the following manner.
foo:1|h
(a histogram - to be translated to a prometheus histogram) is sent to the exporter.foo_count
,foo_sum
andfoo_bucket
.foo_count:1|c
arrives at the exporter, the exporter will also register the counter.Changes
TestConflictingMetrics()
by using a new Prometheus registry for each test run.