-
Notifications
You must be signed in to change notification settings - Fork 34
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
WIP: Add support for prometheus with exemplars #79
base: main
Are you sure you want to change the base?
Conversation
fbb8fae
to
720c498
Compare
a few notes/questions:
|
- Pull in latest v1.4.1 prometheus client - Add WithExemplar methods to counters and histograms Signed-off-by: Shreyas Srivatsan <[email protected]>
Signed-off-by: Shreyas Srivatsan <[email protected]>
Signed-off-by: Shreyas Srivatsan <[email protected]>
7cbf4b2
to
c026527
Compare
prometheus/openmetrics only support exemplars on counters and histograms.
Exemplars stand for example values and labels emitted along side metrics. In the case of tracing it could be a traceid and/or spanid allowing one to associated a metric datapoint with a trace.
Yes, we could certainly do that.. Instead of
Right, that will be difficult as the labels will change each time, so its better to pass it in as a parameter. The alternate to changing the interface is adding a separate interface the same way prometheus does and have the caller check what interface it has and emit exemplars if it finds the
|
I realize that, but as far as the exposition format, is this purely limited to exemplars, or can it have other metadata? Is there structure to that data? I recall that OpenMetric format represented exemplars almost like comments attached to values. The point is, if the actual semantics of the attached data is larger than just exemplars, then it's the wrong name to use.
That's what we'll most likely need to do, because otherwise we need bump the major version of this lib. |
Yes, its in the comment part of the metric. But the structure is just an exemplar.
Makes sense. I'll change this to that.. Also, I noticed one thing which will make pushing this change not easy. Importing v1.4.1 prom client pull in a go modules v2 package of https://github.com/cespare/xxhash, but |
Signed-off-by: Shreyas Srivatsan <[email protected]>
@yurishkuro I went ahead and changed the implementation to have separate interfaces and pass in |
Which problem is this PR solving?
The change adds support for emitting exemplars alongside metrics using the latest prometheus client.
Short description of the changes