-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fix exemplars being added to gauge metrics in the prometheus exporter #5912
Fix exemplars being added to gauge metrics in the prometheus exporter #5912
Conversation
e713527
to
7f366df
Compare
Would be good to have a test |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5912 +/- ##
=====================================
Coverage 84.6% 84.6%
=====================================
Files 272 272
Lines 22837 22839 +2
=====================================
+ Hits 19322 19325 +3
+ Misses 3171 3170 -1
Partials 344 344 |
45c3a10
to
2d16850
Compare
@dashpole Added a test, let me know if you know of a better way to test this, I did step through the debugger and exemplars are getting added to the |
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Co-authored-by: David Ashpole <dashpole@google.com>
Co-authored-by: Damien Mathieu <42@dmathieu.com>
Thanks so much for working with me on this @dashpole. |
Prometheus Gauge metrics don't support exemplars and while
addGaugeMetric()
doesn't add them,addSumMetric()
will if the metric is monotonic. This causes the prometheus client to throw an error: