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 receiver uses Deprecated attributes from old semconv version #32814

Closed
robincw opened this issue May 2, 2024 · 4 comments · Fixed by #32829
Closed

Prometheus receiver uses Deprecated attributes from old semconv version #32814

robincw opened this issue May 2, 2024 · 4 comments · Fixed by #32829
Assignees
Labels
enhancement New feature or request receiver/prometheus Prometheus receiver

Comments

@robincw
Copy link

robincw commented May 2, 2024

Component(s)

receiver/prometheus

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

The Prometheus receiver uses semconv/v1.6.1 since 2 years ago
to add resource attributes to convert from the Prometheus to the OpenMetrics convention when scraping
but these are confusing in meaning and deprecated according to latest documentation.

In addition, there are many dependencies (alerts, dashboards, recording rules) in the world which depend on the job and instance labels in metrics but the receiver is dropping these without any option to keep them.

Describe the solution you'd like

The attributes should be updated to match the spec described here.

Dropping job and instance attributes in the receiver should be configurable so Prometheus labels can be kept in addition to the semconv labels added. Or this should not be done by receivers at all as it can be done be attribute processor.

Describe alternatives you've considered

Currently using the attributes processor to re-add the job and instance attributes, and to remove the confusing net.* attributes.

Additional context

No response

@robincw robincw added enhancement New feature or request needs triage New item requiring triage labels May 2, 2024
Copy link
Contributor

github-actions bot commented May 2, 2024

Pinging code owners:

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

@github-actions github-actions bot added the receiver/prometheus Prometheus receiver label May 2, 2024
@robincw
Copy link
Author

robincw commented May 2, 2024

Similar issue found for mongodb receiver #32810

@dashpole
Copy link
Contributor

dashpole commented May 2, 2024

Dropping job and instance attributes in the receiver should be configurable so Prometheus labels can be kept in addition to the semconv labels added.

Are you referring to job + instance being translated to service.name and service.instance.id? That is required by the translation specification, as service resource attributes are required to uniquely identify timeseries in OTel.

I've opened #32829 to update other attributes used

@robincw
Copy link
Author

robincw commented May 2, 2024

job + instance being translated to service.name and service.instance.id is not a problem, and required by the spec, but dropping them could be a configurable opt-out , I think? This would aid migration of downstream dependencies on the data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request receiver/prometheus Prometheus receiver
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants