Skip to content

Prometheus exporter: Stabilize config option scope_info_enabled#5056

Merged
reyang merged 5 commits into
open-telemetry:mainfrom
ArthurSens:promexporter-stabilize-scope-info
May 13, 2026
Merged

Prometheus exporter: Stabilize config option scope_info_enabled#5056
reyang merged 5 commits into
open-telemetry:mainfrom
ArthurSens:promexporter-stabilize-scope-info

Conversation

@ArthurSens

Copy link
Copy Markdown
Member

Fixes #4989

Changes

Stabilizes the configuration option without_scope_info, documented in the Prometheus exporter spec. It is implemented by a few SDKs already #4989 (comment), an open PR for Python(open-telemetry/opentelemetry-python#5123), and an issue for DotNet(open-telemetry/opentelemetry-dotnet#7157). Both prometheus exporters in the collector have the option as well[1][2] (Although remote write exporter uses disable_scope_info instead of without_scope_info.

For non-trivial changes, follow the change proposal process.

@ArthurSens
ArthurSens requested review from a team as code owners April 27, 2026 13:39
dashpole
dashpole previously approved these changes Apr 27, 2026

@dashpole dashpole left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

the _info suffix is a relic of the otel_scope_info metric we used to have. But it doesn't seem worth it to change it now.

@jack-berg jack-berg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hey I want us to consider changing the names of a few of these prometheus exporter property names before stabilizing.

I think the whole with_ prefix pattern is weird. Not sure where that came about but we don't see that anywhere else in SDK component config properties.

I think the use of "without" without_scope_info / without_target_info with a default value of false was probably inspired by the "All Boolean environment variables SHOULD be named and defined such that false is the expected safe default behavior." language that we decided is not applicable to other configuration interfaces: #4723

So since there's no env vars for without_scope_info / without_target_info, we don't need to be constrained by that.

I propose these names, which I find more consistent with property naming elsewhere in the project and more intuitive:

  • without_scope_info -> scope_info_enabled (default true)
  • without_target_info -> target_info_enabled (default true)
  • with_resource_constant_labels -> resource_constant_labels (default none are added)

@dashpole

dashpole commented May 6, 2026

Copy link
Copy Markdown
Contributor

True. I think the pattern probably came from Go. The prefix should be removed.

@dashpole
dashpole dismissed their stale review May 6, 2026 14:26

Lets update the names

@jack-berg

Copy link
Copy Markdown
Member

True. I think the pattern probably came from Go. The prefix should be removed.

I'll open a PR to adjust the parameter names today

@ArthurSens

ArthurSens commented May 6, 2026

Copy link
Copy Markdown
Member Author

I don't have any problems with changing the configuration option. Most existing implementations are already using the "without" wording, though. Including the Collector, which has a HUGE user base.

I totally understand that the spec says MAY, so implementors don't need to follow the wording to the letter, but it feels inconsistent to me that the spec suggests one thing and most implementors use another.

@jack-berg

Copy link
Copy Markdown
Member

#5071

A change in the spec property name doesn't stop an implementation from using the function options with pattern. See how opentelemetry-go OTLP exporters use with* for all the OTLP property options.

I see that the collector prometheus exporter does include a without_scope_info. The codeowners will need to navigate what to do about that. My 2p is that name is inconsistent. If without_scope_info, why send_timestamps vs with_timestamps, const_labels vs. with_const_labels, translation_strategy vs. with_translation_strategy? Naming is hard.

@ArthurSens

Copy link
Copy Markdown
Member Author

Yeah, no strong opinions here. If the group prefers rewording the config, I'll be happy to do it; I just wanted to reinforce that current implementors are all using different names.

pull Bot pushed a commit to CodeWeaver13/opentelemetry-specification that referenced this pull request May 11, 2026
Here, I change:

* without_scope_info -> scope_info_enabled (default true)
* without_target_info -> target_info_enabled (default true)
* with_resource_constant_labels -> resource_constant_labels (default
none are added)

The `with` prefix of a few (but not all) prometheus exporter options
seems to be a carry over from go functional options pattern. We don't
see it in the spec'd property names of any other built in components. It
doesn't doesn't contribute to the property's meaning in any way.
Omitting it doesn't block a language from using it in their
implementation, since that choice falls within maintainer discretion.

I think the use of "without" without_scope_info / without_target_info
with a default value of false was probably inspired by the "All Boolean
environment variables SHOULD be named and defined such that false is the
expected safe default behavior." language that we decided is not
applicable to other configuration interfaces:
open-telemetry#4723

So since there's no env vars for without_scope_info /
without_target_info, we don't need to be constrained by that.

Originated from:
open-telemetry#5056 (comment)

Corresponding change in declarative config schema:
github.com/open-telemetry/opentelemetry-configuration/pull/612
Comment thread CHANGELOG.md Outdated
@ArthurSens ArthurSens changed the title Prometheus exporter: Stabilize config option without_scope_info Prometheus exporter: Stabilize config option scope_info_enabled May 13, 2026
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
Signed-off-by: Arthur Silva Sens <arthursens2005@gmail.com>
@ArthurSens
ArthurSens force-pushed the promexporter-stabilize-scope-info branch from e3ce19f to 7708f57 Compare May 13, 2026 13:36

@cijothomas cijothomas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Checking if we have met usual requirement of 2-3 sdk implementations before stabilizing?
If needed, I can help get OTel Rust to implement this, if that helps. (Or if this was already covered, no issues!)

@ArthurSens

Copy link
Copy Markdown
Member Author

Checking if we have met usual requirement of 2-3 sdk implementations before stabilizing? If needed, I can help get OTel Rust to implement this, if that helps. (Or if this was already covered, no issues!)

We have, so far, 1) Collector's Prometheus exporter, 2) Collector's Prometheus Remote Write exporter, 3) OTel Go SDK, 4) OTel Java SDK.

Then open PRs for Python and Rust.

@cijothomas

Copy link
Copy Markdown
Member

Checking if we have met usual requirement of 2-3 sdk implementations before stabilizing? If needed, I can help get OTel Rust to implement this, if that helps. (Or if this was already covered, no issues!)

We have, so far, 1) Collector's Prometheus exporter, 2) Collector's Prometheus Remote Write exporter, 3) OTel Go SDK, 4) OTel Java SDK.

Then open PRs for Python and Rust.

Thanks for confirming. The new names are not yet reflected in those implementations, but we haven't released spec with that changes yet!

@cijothomas cijothomas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM.
A minor non-blocker - the recent rename of the option is not yet implemented in the languages(in flight in some). It won't hurt to wait till that happens before merging this.

@reyang
reyang added this pull request to the merge queue May 13, 2026
Merged via the queue into open-telemetry:main with commit 97ea2d8 May 13, 2026
9 checks passed
@ArthurSens
ArthurSens deleted the promexporter-stabilize-scope-info branch May 14, 2026 08:36
@carlosalberto carlosalberto mentioned this pull request May 15, 2026
pull Bot pushed a commit to CodeWeaver13/opentelemetry-specification that referenced this pull request May 20, 2026
### Metrics

- Add in-development `Bind` API to synchronous instruments.

([open-telemetry#5050](open-telemetry#5050))
- Clarify that View-provided metric stream `name` is not subject to
instrument
  name syntax validation.

([open-telemetry#5094](open-telemetry#5094))

### Common

- Define the Core packages term.

([open-telemetry#5046](open-telemetry#5046))
- Rework contributing guide to reflect current process.

([open-telemetry#5072](open-telemetry#5072))

### Compatibility

- Stabilize sections of Prometheus and OpenMetrics Compatibility.
- Stabilize translation of labels prefixed with `otel_scope_` to OTLP
Instrumentation Scope.

([open-telemetry#5004](open-telemetry#5004))
  - Stabilize OpenTelemetry Gauge and Sum to Prometheus transformations.

([open-telemetry#5034](open-telemetry#5034))
- Stabilize OpenTelemetry Instrumentation Scope to Prometheus labels
transformation.

([open-telemetry#5052](open-telemetry#5052))
- Stabilize sections of Prometheus Metrics Exporter.
  - Stabilize temporality.

([open-telemetry#5024](open-telemetry#5024))
  - Stabilize version and format.

([open-telemetry#5083](open-telemetry#5083))
  - Stabilize port configuration.

([open-telemetry#5026](open-telemetry#5026))
  - Stabilize `scope_info_enabled` configuration.

([open-telemetry#5056](open-telemetry#5056))
- Change Prometheus Metric Exporter config property recommended names
(`without_scope_info` -> `scope_info_enabled`, `without_target_info` ->
`target_info_enabled`,
  `with_resource_constant_labels` -> `resource_constant_labels`)

([open-telemetry#5071](open-telemetry#5071))
- Clarify that OTel SDKs should not use unofficial Prometheus clients.

([open-telemetry#5082](open-telemetry#5082))

### OTEPs

- Add OTEP for Semantic Convention Schema v2 with support for multiple
convention
  registries and resolved schema format

([open-telemetry#4815](open-telemetry#4815))

---------

Co-authored-by: Armin Ruech <7052238+arminru@users.noreply.github.com>
hilmarf pushed a commit to apeirora/opentelemetry-specification that referenced this pull request Jun 1, 2026
### Metrics

- Add in-development `Bind` API to synchronous instruments.

([open-telemetry#5050](open-telemetry#5050))
- Clarify that View-provided metric stream `name` is not subject to
instrument
  name syntax validation.

([open-telemetry#5094](open-telemetry#5094))

### Common

- Define the Core packages term.

([open-telemetry#5046](open-telemetry#5046))
- Rework contributing guide to reflect current process.

([open-telemetry#5072](open-telemetry#5072))

### Compatibility

- Stabilize sections of Prometheus and OpenMetrics Compatibility.
- Stabilize translation of labels prefixed with `otel_scope_` to OTLP
Instrumentation Scope.

([open-telemetry#5004](open-telemetry#5004))
  - Stabilize OpenTelemetry Gauge and Sum to Prometheus transformations.

([open-telemetry#5034](open-telemetry#5034))
- Stabilize OpenTelemetry Instrumentation Scope to Prometheus labels
transformation.

([open-telemetry#5052](open-telemetry#5052))
- Stabilize sections of Prometheus Metrics Exporter.
  - Stabilize temporality.

([open-telemetry#5024](open-telemetry#5024))
  - Stabilize version and format.

([open-telemetry#5083](open-telemetry#5083))
  - Stabilize port configuration.

([open-telemetry#5026](open-telemetry#5026))
  - Stabilize `scope_info_enabled` configuration.

([open-telemetry#5056](open-telemetry#5056))
- Change Prometheus Metric Exporter config property recommended names
(`without_scope_info` -> `scope_info_enabled`, `without_target_info` ->
`target_info_enabled`,
  `with_resource_constant_labels` -> `resource_constant_labels`)

([open-telemetry#5071](open-telemetry#5071))
- Clarify that OTel SDKs should not use unofficial Prometheus clients.

([open-telemetry#5082](open-telemetry#5082))

### OTEPs

- Add OTEP for Semantic Convention Schema v2 with support for multiple
convention
  registries and resolved schema format

([open-telemetry#4815](open-telemetry#4815))

---------

Co-authored-by: Armin Ruech <7052238+arminru@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stabilize Prometheus Metrics Exporter spec: Scope Info configuration

8 participants