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

Prometheus exporter: consider removing the ability to set a global metric prefix #3077

Closed
dashpole opened this issue Dec 6, 2022 · 1 comment · Fixed by #3137
Closed

Comments

@dashpole
Copy link

dashpole commented Dec 6, 2022

The current implementation allows specifying a prefix which is globally applied to all metrics for the exporter.

From the OpenMetrics spec on target metadata:

Exposers MUST NOT prefix MetricFamily names or otherwise vary MetricFamily names based on target metadata.
...
The metric names MUST NOT be varied based on target metadata. For example it would be incorrect for all metrics to end up being prefixed with staging_ even if they all originated from targets in a staging environment).

The gist is that name prefixes shouldn't be used to differentiate instances of an application being scraped, which appears to be what we are doing. It isn't entirely clear to me what the original purpose of the prefix was, but if it is to prevent collisions between instrumentation libraries, we should solve that with #3072 instead.

@gursoz
Copy link
Contributor

gursoz commented Jan 19, 2023

Hi - I'm amit. Can I work on this issue? @srikanthccv

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

Successfully merging a pull request may close this issue.

4 participants