From 032213cedde54a2171dfbd234a371501a3537919 Mon Sep 17 00:00:00 2001 From: David Ashpole Date: Wed, 20 Mar 2024 04:15:40 -0400 Subject: [PATCH] prometheus compatibility: clarify that the service triplet is required to be unique by semantic conventions (#3945) Fixes https://github.com/open-telemetry/opentelemetry-specification/issues/3944 OTLP does not include that requirement. Co-authored-by: jack-berg <34418638+jack-berg@users.noreply.github.com> --- CHANGELOG.md | 2 ++ specification/compatibility/prometheus_and_openmetrics.md | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3487c0c1609..3a19777790b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,8 @@ release. - Prometheus compatibility: Clarify naming of the target info metric, and differences between various Prometheus formats. ([#3871](https://github.com/open-telemetry/opentelemetry-specification/pull/3871)) +- Prometheus compatibility: Clarify that the service triplet is required to be unique by semantic conventions. + ([#3945](https://github.com/open-telemetry/opentelemetry-specification/pull/3945)) ### SDK Configuration diff --git a/specification/compatibility/prometheus_and_openmetrics.md b/specification/compatibility/prometheus_and_openmetrics.md index 78c34ea282a..8a171e224c7 100644 --- a/specification/compatibility/prometheus_and_openmetrics.md +++ b/specification/compatibility/prometheus_and_openmetrics.md @@ -425,8 +425,9 @@ formats do not include a notion of resource, and expect metric labels to distinguish scraped targets. By convention, [`job` and `instance`](https://prometheus.io/docs/concepts/jobs_instances/#jobs-and-instances) labels distinguish targets and are expected to be present on metrics exposed on a Prometheus pull exporter (a ["federated"](https://prometheus.io/docs/prometheus/latest/federation/) -Prometheus endpoint) or pushed via Prometheus remote-write. In OTLP, the -`service.name`, `service.namespace`, and `service.instance.id` triplet is +Prometheus endpoint) or pushed via Prometheus remote-write. In OpenTelemetry +semantic conventions, the `service.name`, `service.namespace`, and +`service.instance.id` triplet is [required to be unique](https://github.com/open-telemetry/semantic-conventions/blob/main/docs/resource/README.md#service), which makes them good candidates to use to construct `job` and `instance`. In the collector Prometheus exporters, the `service.name` and `service.namespace`