prometheus: handle schema URL and scope attributes#4505
Merged
carlosalberto merged 14 commits intoopen-telemetry:mainfrom Jun 5, 2025
Merged
prometheus: handle schema URL and scope attributes#4505carlosalberto merged 14 commits intoopen-telemetry:mainfrom
carlosalberto merged 14 commits intoopen-telemetry:mainfrom
Conversation
Member
Author
|
@open-telemetry/prometheus-interoperability, @jade-guiton-dd, @aknuds1, @ywwg: PTAL |
Co-authored-by: Jade Guiton <jade.guiton@datadoghq.com>
lmolkova
reviewed
May 13, 2025
ArthurSens
reviewed
May 14, 2025
dashpole
reviewed
May 16, 2025
ringerc
reviewed
May 20, 2025
dashpole
approved these changes
May 22, 2025
Contributor
dashpole
left a comment
There was a problem hiding this comment.
I'm OK with cleaning up configuration options in a separate PR.
ArthurSens
approved these changes
May 27, 2025
Member
ArthurSens
left a comment
There was a problem hiding this comment.
LGTM, thanks for the help and guidance on this work :)
carlosalberto
approved these changes
Jun 3, 2025
jsuereth
approved these changes
Jun 3, 2025
lmolkova
approved these changes
Jun 3, 2025
Member
Author
|
@carlosalberto, here is the PR that is supposed to fix the hyperlinks: #4542 |
Merged
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jun 12, 2025
### Metrics - Prometheus receiver can expect `otel_scope_schema_url` and `otel_scope_[attribute]` labels on all metrics. ([#4505](#4505)) - Prometheus receiver no longer expects `otel_scope_info` metric. ([#4505](#4505)) - Prometheus exporter adds `otel_scope_schema_url` and `otel_scope_[attribute]` labels on all metrics. ([#4505](#4505)) - Prometheus exporter no longer exports `otel_scope_info` metric. ([#4505](#4505)) ### Entities - Define rules for setting identifying attributes. ([#4498](#4498)) - Define rules for entity-resource referencing model. ([#4499](#4499)) ### Common - Move Instrumentation Scope definition from glossary to a dedicated document and use normative language. ([#4488](#4488))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4223
Prototypes:
Changes
Currently (before this PR) Prometheus and OpenMetrics Compatibility assumes that only scope name and scope version are identifying.
However, with #4161 this is no longer true.
Therefore, this PR updates the Prometheus and OpenMetrics Compatibility specification to add the scope name, version, schema URL, scope attributes to all metrics.
This also removes the
otel_scope_infoas it looks that it won't be useful. See: #4223 (comment).This change important for Collector open-telemetry/opentelemetry-go#5846 (comment). It is also is necessary towards stabilization of OTel-Prom/OpenMetrics compatibility) and the Prometheus exporter.
Initially, I thought about splitting it into a few PRs. However, it looks like doing it in one PR would be a more complete approach (also there are not that many changes).