Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exporter/prometheus: why is add_metric_suffixes enabled by default? #36734

Open
wbollock opened this issue Dec 9, 2024 · 2 comments
Open

exporter/prometheus: why is add_metric_suffixes enabled by default? #36734

wbollock opened this issue Dec 9, 2024 · 2 comments
Assignees

Comments

@wbollock
Copy link

wbollock commented Dec 9, 2024

Component(s)

exporter/prometheus

Describe the issue you're reporting

I was surprised to see that add_metric_suffixes is enabled by default. It is an opinionated feature flag that modifies metrics in a way some operators may not expect. It can be difficult to track down why metrics are not available anymore just to find that opentelemetry-collector-contrib is automatically changing their series names.

I propose the setting is turned off by default instead as the default behavior of the Prometheus exporter should be to simply relay the metrics it is told to expose rather than conform them to specific standards.

From what I can tell it is set to true to preserve even older behavior: 2bc9904

@wbollock wbollock added the needs triage New item requiring triage label Dec 9, 2024
Copy link
Contributor

github-actions bot commented Dec 9, 2024

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@wbollock wbollock changed the title exporter/prometheus: why is add_metric_suffixes enabled by defualt? exporter/prometheus: why is add_metric_suffixes enabled by default? Dec 9, 2024
@dashpole dashpole removed the needs triage New item requiring triage label Dec 10, 2024
@dashpole dashpole self-assigned this Dec 10, 2024
@dashpole
Copy link
Contributor

This has been a topic of much discussion. We even ran a community survey to better understand sentiment: https://opentelemetry.io/blog/2024/prometheus-compatibility-survey/, which showed that opinions on the topic are very split.

For suffixes in particular, there are a few challenges:

  • OpenMetrics requires unit suffixes on the metric name and _total suffixes on counter timeseries, which i'm hoping to change in a future version of OpenMetrics.
  • Units are identifying in OpenTelemetry, but not in Prometheus. I'm hoping to change that in Prometheus Proposal: Add type and unit metadata labels prometheus/proposals#39 to prevent collisions between metrics with the same name but different unit.

I agree we should change the default to preserve the original name, but it will take some time to get there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants