Skip to content

Conversation

@pellared
Copy link
Member

@pellared pellared commented May 13, 2025

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_info as 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).

@pellared pellared marked this pull request as ready for review May 13, 2025 11:10
@pellared pellared requested review from a team May 13, 2025 11:10
@pellared pellared changed the title prometheus: handle scheme URL and scope attributes prometheus: handle schema URL and scope attributes May 13, 2025
@pellared
Copy link
Member Author

@open-telemetry/prometheus-interoperability, @jade-guiton-dd, @aknuds1, @ywwg: PTAL

@pellared pellared requested a review from jade-guiton-dd May 13, 2025 13:53
@pellared pellared requested a review from ArthurSens May 15, 2025 08:57
Copy link
Contributor

@dashpole dashpole left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm OK with cleaning up configuration options in a separate PR.

Copy link
Member

@ArthurSens ArthurSens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the help and guidance on this work :)

@pellared pellared requested a review from lmolkova May 28, 2025 16:39
@pellared
Copy link
Member Author

pellared commented Jun 4, 2025

@carlosalberto, here is the PR that is supposed to fix the hyperlinks: #4542

@carlosalberto carlosalberto added this pull request to the merge queue Jun 5, 2025
@carlosalberto carlosalberto removed this pull request from the merge queue due to the queue being cleared Jun 5, 2025
@carlosalberto carlosalberto added this pull request to the merge queue Jun 5, 2025
Merged via the queue into open-telemetry:main with commit 0c730d9 Jun 5, 2025
6 checks passed
@pellared pellared deleted the rm-scope-info branch June 5, 2025 17:31
@carlosalberto carlosalberto mentioned this pull request Jun 6, 2025
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))
github-merge-queue bot pushed a commit that referenced this pull request Jul 24, 2025
…me, version and schema URL (#4599)

## Changes

Small adjustment after
#4505

cc @pellared @dashpole @aknuds1 @ywwg

Signed-off-by: Arthur Silva Sens <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects

Development

Successfully merging this pull request may close these issues.

[Prometheus and OpenMetrics] Handle scheme URL and scope attributes as identifying

8 participants