diff --git a/CHANGELOG.md b/CHANGELOG.md index 0bc0648f16a..ae2dd7d9bf1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,9 @@ release. ### Compatibility +- Stabilize Prometheus Summary to OTLP Summary transformation. + ([#4872](https://github.com/open-telemetry/opentelemetry-specification/pull/4872)) + ### SDK Configuration ### Supplementary Guidelines diff --git a/specification/compatibility/prometheus_and_openmetrics.md b/specification/compatibility/prometheus_and_openmetrics.md index 1dbc61f0b13..97189cded43 100644 --- a/specification/compatibility/prometheus_and_openmetrics.md +++ b/specification/compatibility/prometheus_and_openmetrics.md @@ -182,14 +182,16 @@ Native Histograms with `Schema` outside of the range [-4, 8] MUST be dropped. ### Summaries -**Status**: [Development](../document-status.md) +**Status**: [Stable](../document-status.md) + +[Prometheus Summary](https://prometheus.io/docs/instrumenting/exposition_formats/#basic-info) MUST be converted to an [OTLP Summary](https://opentelemetry.io/docs/specs/otel/metrics/data-model/#summary-legacy). + +Prometheus Summary Quantiles become OTLP Summary Quantiles. Prometheus Summary Count becomes OTLP Summary Count and Prometheus Summary Sum becomes OTLP Summary Sum. -[Prometheus Summary](https://prometheus.io/docs/instrumenting/exposition_formats/#basic-info) MUST be converted to an OTLP Summary. +In the text format, samples without suffixes have the `quantile` label to identify the quantile points of the Prometheus Summary. Extra samples with the same metric name but with the suffixes `_count` and `_sum` are used to identify the Prometheus Summary Count and Sum respectively. -Multiple Prometheus metrics are merged together into a single OTLP Summary: +In text formats where Prometheus Summaries are represented by multiple samples, samples with same [metric family](https://github.com/prometheus/OpenMetrics/blob/main/specification/OpenMetrics.md#metricfamily) name MUST be merged together into a single OTLP Summary. -* The `quantile` label on non-suffixed metrics is used to identify quantile points in summary metrics. Each Prometheus line produces one quantile on the resulting summary. -* Lines with `_count` and `_sum` suffixes are used to determine the summary's count and sum. * If `_count` is not present, the metric MUST be dropped. * If `_sum` is not present, the summary's sum MUST be [set to zero.](https://github.com/open-telemetry/opentelemetry-proto/blob/d8729d40f629dba12694b44c4c32c1eab109b00a/opentelemetry/proto/metrics/v1/metrics.proto#L601)