-
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
prometheusreceiver upsert job to service.name #8060
Comments
Setting the Since you appear to be using the OTel Go SDK to generate these metrics, would it be possible to use the OTLP exporter and receiver? Those components will properly distinguish between, and preserve, resource and metric attributes. |
Thank you very much for your reply! But I'm thinking, since otel has opened up the prom way to expose the metrics, then this problem must exist and need to be solved, right? Is it necessary to rethink the specification? |
And my question is: prometheusreceiver set the value of the job to |
I just ran into this. It doesn't make sense that the service doing the scraping gets to rename the service if it is already set. Especially if the endpoint is an aggregation of multiple services. My specific use case is using the Span Metrics Processor to set up timing for multiple services. The path recommended to use for rate-limiting makes this bug appear. |
Yes, I also feel that not all metrics need the |
Note, I did use the method that Aneurysm9 suggested (hooking up the pipelines via otlp) and that seems to work rather well for my use case. |
Yes, using OTLP is not a problem and meets expectations, but we also have to consider ways to be compatible with prometheusreceiver |
Sorry, just finding this. After #8265, we will support receiving resource information from the target info metric. It should be possible after that to choose either to keep |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping |
For anyone else who comes across this. Here's the processor config I used to correct my processors:
resource:
attributes:
- key: service.name
from_attribute: service_name
action: upsert
- key: service_name
action: delete Though annoyingly this will delete the |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping |
This issue has been closed as inactive because it has been stale for 120 days with no activity. |
Describe the bug
When using prometheusreceiver, if the user has declared service.name in resource attributes, it will be overridden by the job
Steps to reproduce
What did you expect to see?
The service_name should be kafka-producer, not job
What did you see instead?
The service_name should is job value
What version did you use?
v0.45.1
What config did you use?
Environment
MacOs
go 17.6
Additional context
open-telemetry/opentelemetry-collector#3139 (comment)
The text was updated successfully, but these errors were encountered: