Skip to content

Prom compatibility: allow disabling the addition of _total suffixes on prometheus counters#3590

Merged
reyang merged 2 commits intoopen-telemetry:mainfrom
dashpole:allow_disable_suffix
Jul 13, 2023
Merged

Prom compatibility: allow disabling the addition of _total suffixes on prometheus counters#3590
reyang merged 2 commits intoopen-telemetry:mainfrom
dashpole:allow_disable_suffix

Conversation

@dashpole
Copy link
Contributor

Part of open-telemetry/opentelemetry-go#4305

Motivation

When migrating from OpenCensus to OpenTelemetry, and using Prometheus exporters, it causes a breaking change in the metric name for counters that were not complying with Prometheus naming recommendations. This is because OpenCensus does not add _total suffixes for counters. For example, the metric my.metric.foo became my_metric_foo in OpenCensus. But in OpenTelemetry, it now becomes my_metric_foo_total.

Changes

Prometheus exporters should allow disabling the addition of _total suffixes through configuration.

cc @open-telemetry/wg-prometheus @jmacd @jsuereth

@reyang reyang merged commit 6f84b7c into open-telemetry:main Jul 13, 2023
carlosalberto pushed a commit to carlosalberto/opentelemetry-specification that referenced this pull request Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants