Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ release.
([#4898](https://github.com/open-telemetry/opentelemetry-specification/pull/4898))
- Stabilize Prometheus Dropped Types transformation.
([#4952](https://github.com/open-telemetry/opentelemetry-specification/pull/4952))
- Stabilize OpenTelemetry Attributes to Prometheus labels transformation.
([#4963](https://github.com/open-telemetry/opentelemetry-specification/pull/4963))

### SDK Configuration

Expand Down
19 changes: 8 additions & 11 deletions specification/compatibility/prometheus_and_openmetrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,6 @@ in keys).

## OTLP Metric points to Prometheus

**Status**: [Development](../document-status.md)

### Metric Metadata

**Status**: [Development](../document-status.md)
Expand Down Expand Up @@ -520,21 +518,20 @@ An [OpenTelemetry Summary](../metrics/data-model.md#summary-legacy) MUST be conv

### Metric Attributes

**Status**: [Development](../document-status.md)
**Status**: [Stable](../document-status.md)

OpenTelemetry Metric Attributes MUST be converted to
[Prometheus labels](https://prometheus.io/docs/concepts/data_model/#metric-names-and-labels).
String Attribute values are converted directly to Metric Attributes, and
non-string Attribute values MUST be converted to string attributes following
the [attribute specification](../common/README.md#attribute). Prometheus
the [attribute specification](../common/README.md#anyvalue-representation-for-non-otlp-protocols). Prometheus
naming conventions encourage metric names to match the following regular expression:
`[a-zA-Z_]([a-zA-Z0-9_])*`. Discouraged characters SHOULD be replace with the `_` character.
Multiple consecutive `_` characters SHOULD be replaced with a single `_`
character. This may cause ambiguity in scenarios where multiple similar-named
attributes share invalid characters at the same location. In such unlikely
cases, if multiple key-value pairs are converted to have the same Prometheus
key, the values MUST be concatenated together, separated by `;`, and ordered by
the lexicographical order of the original keys.
`[a-zA-Z_]([a-zA-Z0-9_])*`. Discouraged characters SHOULD be replaced with the
`_` character. Multiple consecutive `_` characters SHOULD be replaced with a
single `_` character. This conversion, or other labels (e.g. `otel_scope_name`)
added by this specification, may cause different OpenTelemetry keys to map to
the same Prometheus key. In such cases, the values MUST be concatenated together,
separated by `;`, and ordered by the lexicographical order of the original keys.
Comment thread
dashpole marked this conversation as resolved.

### Exemplars

Expand Down
Loading