-
Notifications
You must be signed in to change notification settings - Fork 235
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 disappears during OpenTelemetry metrics to Prometheus metrics conversion #320
Comments
It seems it's skipping writing exemplars as they are considered out-of-order by this if-statement: https://github.com/grafana/agent/blob/main/component/otelcol/exporter/prometheus/internal/convert/convert.go#L335
EDIT: Might be related to this: open-telemetry/opentelemetry-java#4193. It seems that the OTEL converter does not check for out-of-order timestamps, and the reason it's able to convert the exemplars: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/prometheusexporter/collector.go#L50 Here is my OTEL collector config for reference:
|
Would it be possible to have an option to allow out of order exemplars? |
This issue has not had any activity in the past 30 days, so the |
Looks like the code for the converter moved since @akselleirv's last comment: Would it make sense to ignore the timestamp entirely, since Mimir (currently) rejects out-of-order exemplars anyway? For example, I get this in Grafana Agent's logs when it attempts to push some exemplars to Mimir:
I also opened grafana/mimir#7748 to hopefully resolve this from the Mimir side. |
Upstream issue for out-of-order exemplar support in Prometheus: prometheus/prometheus#13577 |
Hi there 👋 On April 9, 2024, Grafana Labs announced Grafana Alloy, the spirital successor to Grafana Agent and the final form of Grafana Agent flow mode. As a result, Grafana Agent has been deprecated and will only be receiving bug and security fixes until its end-of-life around November 1, 2025. To make things easier for maintainers, we're in the process of migrating all issues tagged variant/flow to the Grafana Alloy repository to have a single home for tracking issues. This issue is likely something we'll want to address in both Grafana Alloy and Grafana Agent, so just because it's being moved doesn't mean we won't address the issue in Grafana Agent :) |
This working for me so I'll close the issue. |
What's wrong?
OpenTelemetry exemplars are not converted in the
otelcol.exporter.prometheus
component.I'm using the OpenTelemetry Java instrumentation with the following command
java -javaagent:opentelemetry-javaagent.jar -jar target/rest-service-complete-0.0.1.jar
which instruments the SpringBoot application. It will then send traces and metrics to the Grafana Agent which then converts it to Prometheus metrics and sends it to Mimir. I then expect exemplars to be available when querying in Grafana, which is not the case.I have replaced Grafana Agent with using the OpenTelemetry collector instead, and expose the converted metrics on the collector. Then let Grafana Agent scrape the collector and send them to Mimir. Then the exemplars are available in Grafana.
So it seems that the issue is within the Grafana Agent metrics conversion.
Steps to reproduce
java -javaagent:opentelemetry-javaagent.jar -jar target/rest-service-complete-0.0.1.jar
http_server_duration_milliseconds_bucket
in Grafana with exemplars enabled which will not display any exemplars in the graph window.System information
darwin/arm64
Software version
Grafana Agent v0.37.3
Configuration
Logs
No response
The text was updated successfully, but these errors were encountered: