-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Receive OTLP HTTP metrics, forward to Prometheus, collision on metric names #21471
Comments
Move to contrib, since this is an issue in translating otlp to prometheus remote write. |
Pinging code owners for exporter/prometheusremotewrite: @Aneurysm9 @rapphil. See Adding Labels via Comments if you do not have permissions to add labels yourself. |
The PRW translation logic needs to be updated to conform to the spec for handling instrumentation scope in Prometheus exporters. The PRW exporter should also be given a configuration option to disable adding these labels. |
Familiar neither with the code nor with go, so I can't provide a patch. From code reading, it seems the naming translation happens at:
|
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Ping to avoid automatically closing the issue, the problem is still relevant. If this is tracked by another issue number, please link it. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Again: Ping to avoid automatically closing the issue, the problem is still relevant. If this is tracked by another issue number, please link it. In light of:
I would like to know how an application is expected to instrument metrics here:
|
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been closed as inactive because it has been stale for 120 days with no activity. |
Ping @Aneurysm9 @rapphil @kovrus @bogdandrutu This issue is still relevant, and is still blocking to deploy an application using: Per previous analysis from @Aneurysm9:
This is a confirmed bug in the prometheus write exporter. Why are verified bugs automatically closed by github actions, which purpose does that serve ? |
Setup:
In a test application, define meters and metrics as follows:
my_meter_1
my_metric_a
my_metric_b
my_meter_2
my_metric_a
my_metric_b
my_metric_c
As far as I understand, this is valid, because what identifies a metric is the instrumentation scope + the metric name, so that
my_meter_1.my_metric_a
andmy_meter_2.my_metric_a
are two different metrics.Export this using OTLP HTTP, to an opentelemetry-collector.
From the collector logs, the data received is:
So far, this works as expected: the opentelemetry collector receives data that describe:
my_meter_1
and metricmy_metric_a
my_meter_2
and metricmy_metric_a
Now, in the opentelemetry collector, forward the metric data to prometheus:
Data is sent using prometheusremotewrite, and is visible in prometheus.
The issue is that prometheus only displays:
The fully qualified name (my_meter_1.my_metric_a) is lost in the chain, so that data from different meters (my_meter_1 and my_meter_2) is mixed when there is a name collision on the metric name (my_meter_a).
Expected result:
my_meter_1_my_metric_a
visible in prometheus (or something similar)my_meter_2_my_metric_a
visible in prometheusIn other words, there should be some way to preserve the fully qualified name of a metric when exporting it from OTLP to prometheus, so that metrics from different meters can be separated.
The text was updated successfully, but these errors were encountered: