-
Notifications
You must be signed in to change notification settings - Fork 378
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
feat: add support for exemplars #432
Conversation
e6f607b
to
55fe377
Compare
55fe377
to
198d9d7
Compare
198d9d7
to
f5d33ed
Compare
@siimon @zbjornson I implemented this similar to labels. It publishes metrics in a similar fashion as prometheus uses to parse them. If Let me know if the direction I'm taking is okay. So far it satisfies everything in the OpenMetrics exemplar spec except for the optional timestamp. I'll add that shortly. |
@zbjornson @siimon any advice on this? |
@zbjornson @siimon would you be OK with someone else reviewing this MR? |
@samarara thanks for this MR. i would love to help if you need. |
Sorry for the delay. I need to read up on exemplars and OpenMetrics to review this, but am in favor of adding support. If someone else who's familiar with these concepts wants to help review, that'd be much appreciated! It would also be helpful if someone can provide links to docs or code for the equivalent functionality in the other Prometheus client libraries (go/java/.NET/etc.). |
This MR is a bit out dated as the counter logic has changed since I authored this. Any help would be greatly appreciated. Here is the spec: For the Java client it's implemented for both counters and histograms: https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#exemplars-1 |
This landed in #544 I believe - sorry about the radio silence! |
With exemplar support coming to Prometheus version 2.26.0 I thought I could start on this. Also addresses #410.
Looking for some direction to see if this the right approach to take. I started with Counter and I'm going to add another function to registry to call depending on
register.contentType