Skip to content

[configuration] Clarify that the boolean value environment variable guidance is not applicable to other configuration interfaces#4723

Merged
carlosalberto merged 16 commits intoopen-telemetry:mainfrom
mx-psi:mx-psi/not-applicable
Dec 10, 2025
Merged

[configuration] Clarify that the boolean value environment variable guidance is not applicable to other configuration interfaces#4723
carlosalberto merged 16 commits intoopen-telemetry:mainfrom
mx-psi:mx-psi/not-applicable

Conversation

@mx-psi
Copy link
Copy Markdown
Member

@mx-psi mx-psi commented Nov 5, 2025

Updates #4344

Changes

Clarifies that environment variable guidance regarding boolean values is not applicable to other configuration interfaces. This does not explicitly state what the guidance should be in other cases.

…uidance is not applicable to other configuration interfaces
@mx-psi mx-psi force-pushed the mx-psi/not-applicable branch from a7872e5 to 2e2811e Compare November 5, 2025 13:08
Copy link
Copy Markdown
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 agree with the intent of the change, but it seems like it will create more confusion to me, as it implies (but doesn't specify) that the rest of the document applies to declarative configuration. I would prefer splitting the env var spec into a "common" config spec (excluding the boolean spec), and the env var spec with the current bool spec + anything else that only applies to env vars.

@mx-psi
Copy link
Copy Markdown
Member Author

mx-psi commented Nov 6, 2025

Makes sense, I will wait for a few more days and apply the suggested change if there is no dissent :)

github-merge-queue bot pushed a commit to open-telemetry/opentelemetry-collector that referenced this pull request Nov 7, 2025
<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description

<!-- Issue number if applicable -->

Marks `configoptional.AddEnabledField` as beta. I have verified that it
would work correctly for cookies configuration and made a PoC for
keepalives (I will push a PR for it after this PR has been merged).

I spent some time updating
open-telemetry/opentelemetry-specification/issues/4344 and filed
open-telemetry/opentelemetry-specification/pull/4723 as a way to
explicitly state that the guidance only applies to environment
variables. The issue remains unresolved, but given the current usages of
`enabled` (see
open-telemetry/opentelemetry-specification#4344 (comment))
I don't see a reason to not go forward with this.

#### Link to tracking issue
Updates #14021
@mx-psi
Copy link
Copy Markdown
Member Author

mx-psi commented Nov 14, 2025

I agree with the intent of the change, but it seems like it will create more confusion to me, as it implies (but doesn't specify) that the rest of the document applies to declarative configuration. I would prefer splitting the env var spec into a "common" config spec (excluding the boolean spec), and the env var spec with the current bool spec + anything else that only applies to env vars.

@dashpole I pushed an attempt to split the guidance:

  1. I renamed "configuration type" to " Type-specific guidance"
  2. I moved type-specific guidance that is not applicable to env variables into a new common.md document. I kept in the SDK env variables one:
  • The guidance about boolean variables
  • The guidance about fail to parse for numeric variables (I assume failure to parse is going to lead to an error and not a warning in implementations since it will be handled by the JSON/YAML parsing library)

Other parts of the spec were using these sections as "here are the type definitions" and now the links for "type definitions" are split among two documents. We were never too consistent with this, so I feel like it is okay to do this

@mx-psi mx-psi requested a review from trask November 25, 2025 10:28
@trask
Copy link
Copy Markdown
Member

trask commented Nov 25, 2025

cc @open-telemetry/configuration-approvers

Copy link
Copy Markdown
Member

@jack-berg jack-berg left a comment

Choose a reason for hiding this comment

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

Couple small comments but I agree with the direction 👍

Copy link
Copy Markdown
Member

@jack-berg jack-berg left a comment

Choose a reason for hiding this comment

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

I prefer "configuration interfaces" over "configuration sources", but LGTM 👍

@carlosalberto
Copy link
Copy Markdown
Contributor

I think we can merge this, specially after @jack-berg gave his blessing?

@carlosalberto
Copy link
Copy Markdown
Contributor

@mx-psi We need a final pass to make the linter happy ;)

./specification/configuration/common.md:108:3 MD052/reference-links-images Reference links and images should use a label that is defined [Missing link or image reference definition: "enum"] [Context: "[Enum][]"]

@mx-psi
Copy link
Copy Markdown
Member Author

mx-psi commented Dec 10, 2025

@mx-psi We need a final pass to make the linter happy ;)

./specification/configuration/common.md:108:3 MD052/reference-links-images Reference links and images should use a label that is defined [Missing link or image reference definition: "enum"] [Context: "[Enum][]"]

That should be fixed now. There are other broken links on files not modified by this PR. I merged main into this branch to see if that would fix any of the issues

@carlosalberto carlosalberto added this pull request to the merge queue Dec 10, 2025
Merged via the queue into open-telemetry:main with commit 379664f Dec 10, 2025
7 checks passed
arminru added a commit to carlosalberto/opentelemetry-specification that referenced this pull request Dec 10, 2025
Moved clarification about boolean environment variables open-telemetry#4723 to the SDK Configuration section.
@carlosalberto carlosalberto mentioned this pull request Dec 12, 2025
github-merge-queue bot pushed a commit that referenced this pull request Dec 12, 2025
### Context

- Make the W3C randomness flag required.

([#4761](#4761))

### Traces

- Deprecate Zipkin exporter document and make exporter implementation
optional.

([#4715](#4715))
- Add spec for `AlwaysRecord` sampler

([#4699](#4699))

### Metrics

- Stabilize `Enabled` API for synchronous instruments.

([#4746](#4746))
- Allow instrument `Enabled` implementation to have additional
optimizations and features.

([#4747](#4747))

### Logs

- Stabilize `LogRecordProcessor.Enabled`.

([#4717](#4717))

### SDK Configuration

- Clarifies that guidance related to boolean environment variables is
not applicable
to other configuration interfaces.
([#4723](#4723))

---------

Co-authored-by: Armin Ruech <7052238+arminru@users.noreply.github.com>
github-merge-queue bot pushed a commit that referenced this pull request Jan 9, 2026
…le negatives (#4823)

(this change has been unblocked by #4723)

This will help avoid double negatives (`disabled: false`) in declarative
configuration, e.g.

instead of
[ExperimentalTracerConfigurator_kitchen_sink.yaml](https://github.com/open-telemetry/opentelemetry-configuration/blob/17d87ca756fe2cc5106d3f84be03c5dcc0184ef7/snippets/ExperimentalTracerConfigurator_kitchen_sink.yaml#L8-L15):

```
tracer_provider:
  tracer_configurator/development:
    default_config:
      disabled: true
    tracers:
      - name: io.opentelemetry.contrib.*
        config:
          disabled: false
```

if this PR is accepted, we would change this to:

```
tracer_provider:
  tracer_configurator/development:
    default_config:
      enabled: false
    tracers:
      - name: io.opentelemetry.contrib.*
        config:
          enabled: true
```

FWIW, this matches similar existing usage of enabled (over disabled) in
the Java agent:

- `otel.instrumentation.common.default-enabled`
- `otel.instrumentation.<name>.enabled`
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.

8 participants