Skip to content

Commit

Permalink
Prevent duplicate Prometheus description comments (#2890)
Browse files Browse the repository at this point in the history
  • Loading branch information
dashpole committed Oct 21, 2022
1 parent 013a40f commit a00c08b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ release.

### Metrics

- Handle duplicate description comments during Prometheus conversion.
([#2890](https://github.com/open-telemetry/opentelemetry-specification/pull/2890))

### Logs

### Resource
Expand Down
8 changes: 8 additions & 0 deletions specification/metrics/data-model.md
Original file line number Diff line number Diff line change
Expand Up @@ -1468,6 +1468,14 @@ in keys).

#### Metric Metadata

Prometheus SDK exporters MUST NOT allow duplicate UNIT, HELP, or TYPE
comments for the same metric name to be returned in a single scrape of the
Prometheus endpoint. Exporters MUST drop entire metrics to prevent conflicting
TYPE comments, but SHOULD NOT drop metric points as a result of conflicting
UNIT or HELP comments. Instead, all but one of the conflicting UNIT and HELP
comments (but not metric points) SHOULD be dropped. If dropping a comment or
metric points, the exporter SHOULD warn the user through error logging.

The Name of an OTLP metric MUST be added as the
[OpenMetrics MetricFamily Name](https://github.com/OpenObservability/OpenMetrics/blob/main/specification/OpenMetrics.md#metricfamily),
with unit and type suffixes added as described below. The metric name is
Expand Down

0 comments on commit a00c08b

Please sign in to comment.