Skip to content

prometheus: remove otel_scope_info #6770

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

pellared
Copy link
Member

@pellared pellared commented May 13, 2025

Fixes #6768

Towards open-telemetry/opentelemetry-specification#4223 (last point from from open-telemetry/opentelemetry-specification#4223 (comment))

  • Remove instrumentation scope attributes as otel_scope_info metric

@pellared pellared added blocked:specification Waiting on clarification of the OpenTelemetry specification before progress can be made pkg:exporter:prometheus Related to the Prometheus exporter package labels May 13, 2025
@pellared
Copy link
Member Author


// Invalid label or metric name leads to error returned from
// createScopeInfoMetric.
invalidName := string([]byte{0xff, 0xfe, 0xfd})
Copy link
Member Author

Choose a reason for hiding this comment

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

This is an invalid UTF and I do not think this test makes sense.
We would have also problems when attributes keys or values would be invalid UTF.

@pellared pellared closed this May 20, 2025
@pellared pellared deleted the rm-scope-info branch May 20, 2025 09:01
@pellared pellared restored the rm-scope-info branch May 20, 2025 16:31
@pellared pellared reopened this May 20, 2025
@pellared
Copy link
Member Author

pellared commented May 23, 2025

@dashpole, I think it is safe to merge.

Removing otel_scope_info would only affect a scenario when scope attributes are used. So far it is not a common scenario.

We had an offline conversation with @ArthurSens and @jsuereth, the conclusion was that a migration flag is important for collector components. For Go SDK, if users want to rely on legacy otel_scope_info, they can always use the previously released version of the exporter before the changes were introduced.

@pellared pellared changed the title [DO NOT MERGE] prometheus: remove otel_scope_info prometheus: remove otel_scope_info May 23, 2025
@pellared pellared removed the blocked:specification Waiting on clarification of the OpenTelemetry specification before progress can be made label May 23, 2025
@pellared
Copy link
Member Author

SIG meeting:
We agreed that this can be merged before updating the spec given we have a preliminary consent with OTel-Prometheus SIG and both exporter and spec are "development".

pellared added a commit that referenced this pull request May 24, 2025
…ls (#5947)

Fixes #5846

Towards
open-telemetry/opentelemetry-specification#4223
(first two points from
open-telemetry/opentelemetry-specification#4223 (comment))

- Add instrumentation scope schema URL as `otel_scope_schema_url` label
to exported metrics
- Add instrumentation scope attributes as `otel_scope_[attribute]`
labels to exported metrics

Side notes:

- The exporter does not seem to work correctly if the end user adds e.g.
an `otel_scope_name` attribute. I think the exporter should ignore all
attributes with names that have prefix `otel_scope_`. This scenario is
also not covered by the spec. I think it may be covered by a separate PR
and issue.
- Removal of `otel_scope_info` metric would be handled as a separate PR.
#6770
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg:exporter:prometheus Related to the Prometheus exporter package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

prometheus: Remove otel_scope_info metric
1 participant