You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the collector Prometheus exporters, the service.name and service.namespace attributes MUST be combined as <service.namespace>/<service.name>, or <service.name> if namespace is empty, to form the job metric label. The service.instance.id attribute, if present, MUST be converted to the instance label; otherwise, instance should be added with an empty value.
Hey @gouthamve, I see your comment on #5757 (comment). For manual testing of honor_labels, you use an upstream prometheus server. For unit testing, can we just make sure job and instance appear correctly on scraped metrics without using the prometheus receiver?
Description
As described in the OpenTelemetry -> prometheus conversion specification, prometheus exporters must add job and instance labels to exported metrics in the collector:
This allows a user to scrape the prometheuxexporter's endpoint with
honor_labels: true
to preserve the original job and instance labels as described in https://prometheus.io/docs/prometheus/latest/federation/#configuring-federation.Currently, the prometheus exporter only adds metric attributes:
opentelemetry-collector-contrib/exporter/prometheusexporter/collector.go
Lines 82 to 98 in 5cd8dd9
The text was updated successfully, but these errors were encountered: