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

Full Prometheus metric name normalization disabled by default #1139

Closed
swiatekm opened this issue May 23, 2023 · 2 comments
Closed

Full Prometheus metric name normalization disabled by default #1139

swiatekm opened this issue May 23, 2023 · 2 comments

Comments

@swiatekm
Copy link

swiatekm commented May 23, 2023

Prometheus and otel metric naming conventions aren't entirely compatible. Prometheus metric name normalization is a feature intended to convert metrics between the two conventions. See the upstream documentation for details.

In the 0.76.1 release, the feature flag for this normalization was enabled by default.

The feature primarily affects the prometheus and prometheusremotewrite exporters. However, it also modifies some metrics collected by the prometheus receiver. More specifically, it trims certain suffixes from metric names. Unfortunately, this affects a lot of widely used metrics. For example, the standard container CPU usage metric:

container_cpu_usage_seconds_total -> container_cpu_usage_seconds

This change breaks a lot of content built using existing metric names and prevents the Prometheus receiver from being used as a drop-in replacement for Prometheus. Therefore, we've decided to default to having this flag disabled. #1138 implements this decision.

The behavior can be re-enabled by passing the --feature-gates=+pkg.translator.prometheus.NormalizeName flag to the collector at startup.

There is an ongoing discussion about making this behavior configurable at runtime. Please follow this issue if you'd like to learn more.

@swiatekm
Copy link
Author

Unpinning this, as the change was reverted upstream in open-telemetry/opentelemetry-collector-contrib#23229. I'm going to keep it open for now.

@swiatekm swiatekm unpinned this issue Jun 22, 2023
@swiatekm
Copy link
Author

Closing, as this is not relevant anymore.

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

No branches or pull requests

1 participant