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

Prometheus exemplar spec compliance #5141

Closed
jack-berg opened this issue Jan 20, 2023 · 1 comment
Closed

Prometheus exemplar spec compliance #5141

jack-berg opened this issue Jan 20, 2023 · 1 comment
Labels
Feature Request Suggest an idea for this project

Comments

@jack-berg
Copy link
Member

jack-berg commented Jan 20, 2023

Here's what the spec has to say about exemplars in the prometheus exporter:

Exemplars on OpenTelemetry Histograms and Monotonic Sums SHOULD be converted to OpenMetrics exemplars. Exemplars on other OpenTelemetry data points MUST be dropped. For Prometheus push exporters, multiple exemplars are able to be added to each bucket, so all exemplars SHOULD be converted. For Prometheus pull endpoints, only a single exemplar is able to be added to each bucket, so the largest exemplar from each bucket MUST be used, if attaching exemplars. If no exemplars exist on a bucket, the highest exemplar from a lower bucket MUST be used, even though it is a duplicate of another bucket's exemplar. OpenMetrics Exemplars MUST use the trace_id and span_id keys for the trace and span IDs, respectively. Timestamps MUST be added as timestamps on the OpenMetrics exemplar, and filtered_attributes MUST be added as labels on the OpenMetrics exemplar unless they would exceed the OpenMetrics limit on characters.

Currently PrometheusHttpServer does not include exemplars on monotonic sums.

Also, PrometheusHttpServer does not include filtered attributes from the exemplar.

We should update to be compliant with the spec.

@jack-berg jack-berg added the Feature Request Suggest an idea for this project label Jan 20, 2023
@jack-berg
Copy link
Member Author

Resolved in #6015.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Suggest an idea for this project
Projects
None yet
Development

No branches or pull requests

1 participant