Skip to content

Use latest metric description / help in Prometheus Exporter #40466

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

Open
wjones127 opened this issue Jun 3, 2025 · 4 comments
Open

Use latest metric description / help in Prometheus Exporter #40466

wjones127 opened this issue Jun 3, 2025 · 4 comments
Labels

Comments

@wjones127
Copy link

Component(s)

exporter/prometheus

Is your feature request related to a problem? Please describe.

If one changes the description of a metric, the Prometheus Exporter will ignore the change, and continue to emit metrics with the old help message. It will also emit a log message:

2025-06-03T18:54:40.508Z	info	[email protected]/collector.go:453	Instrument description conflict, using existing	{"otelcol.component.id": "prometheus", "otelcol.component.kind": "Exporter", "otelcol.signal": "metrics", "instrument": "request_duration", "existing": "Duration of request in milliseconds", "dropped": "Duration of request in seconds"}

It looks like this was improved a while ago in #36356, where before the behavior was to just drop the metrics.

This seems to make it hard to update descriptions if they have typos or need additional information.

Describe the solution you'd like

It would be nice to choose the latest description, rather than the first in these instances. I'm assuming downstream consumers can handle this. If they can't, then we can disregard this.

Describe alternatives you've considered

The alternative is to create new metrics, and have people migrate to those.

Additional context

No response

@wjones127 wjones127 added enhancement New feature or request needs triage New item requiring triage labels Jun 3, 2025
Copy link
Contributor

github-actions bot commented Jun 3, 2025

Pinging code owners:

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

@dashpole
Copy link
Contributor

dashpole commented Jun 3, 2025

Would the alternative be to restart collectors?

One of the things that is nice about the current approach is that the endpoint doesn't "flip flop" between different metadata. That can commonly happen if different clients are sending, or being scraped with conflicting descriptions, for example.

@wjones127
Copy link
Author

Yeah, restarting collectors could be another solution. If that's the suggested solution, I think it might be worthwhile adding that to the warning messsage.

@dashpole dashpole removed the needs triage New item requiring triage label Jun 5, 2025
@dashpole
Copy link
Contributor

dashpole commented Jun 5, 2025

That sgtm

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

No branches or pull requests

2 participants