Skip to content

Commit

Permalink
Prom compat: allow disabling the addition of _total suffixes on prome…
Browse files Browse the repository at this point in the history
…theus counters
  • Loading branch information
dashpole committed Jul 11, 2023
1 parent bb1aa87 commit 72e615d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ release.
- Prometheus: Do not add `_total` suffix if the metric already ends in `_total`.
([#3581](https://github.com/open-telemetry/opentelemetry-specification/pull/3581))
- Prometheus type and unit suffixes are not trimmed by default. ([#3580](https://github.com/open-telemetry/opentelemetry-specification/pull/3580))
- Prometheus exporters SHOULD provide configuration to disable the addition of `_total` suffixes. ([#3590](https://github.com/open-telemetry/opentelemetry-specification/pull/3590))

### OpenTelemetry Protocol

Expand Down
2 changes: 1 addition & 1 deletion specification/compatibility/prometheus_and_openmetrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ An [OpenTelemetry Gauge](../metrics/data-model.md#gauge) MUST be converted to a
- The new data point's start time must match the time of the accumulated data point. If not, see [detecting alignment issues](../metrics/data-model.md#sums-detecting-alignment-issues).
- Otherwise, it MUST be dropped.

If the metric name for monotonic Sum metric points does not end in a suffix of `_total` a suffix of `_total` MUST be added, otherwise the name MUST remain unchanged.
If the metric name for monotonic Sum metric points does not end in a suffix of `_total` a suffix of `_total` MUST be added by default, otherwise the name MUST remain unchanged. Exporters SHOULD provide a configuration option to disable the addition of `_total` suffixes.
Monotonic Sum metric points with `StartTimeUnixNano` should export the `{name}_created` metric as well.

### Histograms
Expand Down

0 comments on commit 72e615d

Please sign in to comment.