Skip to content
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

Exemplars support for Prometheus Counter #2813

Merged

Conversation

jonatan-ivanov
Copy link
Member

fixes gh-2811

@fscellos
Copy link

Hello @jonatan-ivanov , as i comment in #2812, it is necessary to take account sampled trace flags (https://www.w3.org/TR/trace-context/#sampled-flag) to be sure that the trace_id set in exemplars will be effectively recorded in backend storage.

@fscellos
Copy link

Hello, this is doable with OpenTelemetry API (Span.current().getSpanContext().getTraceFlags().isSampled()).
To use it, i think we must implement and use Samplers (ExemplarSampler) that take this information into account no new Examplar is this data is not set to true).
I will try.

@jonatan-ivanov
Copy link
Member Author

jonatan-ivanov commented Feb 15, 2022

@fscellos That would be the responsibility of the implementation of the SpanContextSupplier that we are not providing here. I don't see why would we need OTel for a Prometheus feature.

@fscellos
Copy link

I create an issue on prometheus client for this case : prometheus/client_java#765

@shakuzen shakuzen merged commit 31488cc into micrometer-metrics:main Feb 21, 2022
@jonatan-ivanov jonatan-ivanov deleted the prometheus-counter-exemplar branch February 21, 2022 21:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exemplars support for Prometheus Counter
3 participants