Skip to content

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

@dashpole

Description

@dashpole

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions