-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Unable to remove automatically added job/instance labels from Prometheus Receiver #36245
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Hi @kaushal02! Just looked into this - I believe the reason those labels can not be removed is because they are added by the
This is specific to the prometheus exporter, as the |
Pinging code owners for exporter/prometheus: @Aneurysm9 @dashpole. See Adding Labels via Comments if you do not have permissions to add labels yourself. |
@bacherfl is correct. If you want to remove those labels, you would need to remove the |
Description
I'm trying to prevent or remove the automatically added
job
andinstance
labels from metrics collected via the Prometheus receiver, but none of the documented approaches work.My source metrics look like this:
But after collection through OTEL, they get additional labels:
Configuration
I've tried multiple approaches to remove these labels, none of which worked:
Expected Behavior
The metrics should be collected and exported without the automatically added
job
andinstance
labels, preserving only the original labels from the source metrics.Actual Behavior
The
job
andinstance
labels persist regardless of configuration attempts to remove them.Questions
Environment
OpenTelemetry Collector configuration
Log output
No response
Additional context
These labels are not needed in our use case and add unnecessary complexity to our metrics. While they don't affect functionality, they make metrics harder to work with and increase cardinality unnecessarily.
The text was updated successfully, but these errors were encountered: