Skip to content

Commit

Permalink
Add blurb about labels and incompatibilities.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsuereth authored and dashpole committed Jan 14, 2022
1 parent 126e9c0 commit d5dc606
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion specification/metrics/datamodel.md
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,7 @@ OpenTelemetry metric data.

### Label Mapping

Prometheus metric labels are split in opentelemetry across Resource attributes
Prometheus metric labels are split in OpenTelemetry across Resource attributes
and Metric data stream attributes. Some labels are used within metric
families to denote semantics which open-telemetry captures within the structure
of a data point. When mapping from prometheus to OpenTelemetry, any label
Expand All @@ -1049,6 +1049,11 @@ metric family to a specific OTLP metric data point:
- `__name__` is used to identify the metric name of the data point.
- `__metrics_path__` is ignored in OTLP.

Additionally, in Prometheus metric labels must match the following regex: `[a-zA-Z_:]([a-zA-Z0-9_:])*`. Metrics
from OpenTelemetry with unsupported Attribute names should replace invalid characters with the `_` character. This
may cause ambiguity in scenarios where mulitple similar-named attributes share invalid characters at the same
location. This is considered an unsupported case, and is highly unlikely.

### Prometheus Metric points to OTLP

Prometheus allows metrics to reported in "metric family" groups. While
Expand Down

0 comments on commit d5dc606

Please sign in to comment.