You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
edit (2025-11-05): I am making a summary of the positions so far as well as the arguments in favor or against. The text on the issue before this date is left under the line. Verbatim quotes are formatted in italics.
Position A: Toggle fields (and other boolean fields) should be named so that the default is false
All Boolean environment variables SHOULD be named and defined such that false is the expected safe default behavior. Renaming or changing the default value MUST NOT happen without a major version upgrade.
The declarative configuration spec follows this guidance.
Usages
This convention is used in 9 places in the declarative configuration schema v1.0.0-rc.1 (see kitchen sink).
Some of the usages in the Collector, Java Agent and .NET instrumentation accidentally follow this guidance insofar as they are enabled-by-default. See #4344 (comment), #4344 (comment) and #4344 (comment) for full details.
Position B: Toggle fields should be named enabled, regardless of the default value
Description
All boolean configuration flags should be named enabled regardless of the default value.
Usages
The Collector, Java Agent and .NET instrumentation de facto follow this position. See #4344 (comment), #4344 (comment) and #4344 (comment) for full details. There is one exception for the Collector (but, I argue, it is an 'accident' and not intentional).
Position C: We should have a separate option that defines the default value of fields based on stability
Description
There should be a separate option (e.g. min_stability) that changes the defaults of instrumentations and other features depending on what stability level we consider them having.
Usages
Not currently used.
Arguments in favor and against different positions
Arguments in favor of Position A in the context of environment variables can be found mostly on #2755 (comment). As a summary the arguments espoused were the following (see full comment and context here):
"User confusion around if they are or are not required to provide an environment variable diminishes when they know that by not providing it it will be assumed false"
"It would be a huge frustration for a user to upgrade their system and all of a sudden they now need to set OTEL_SDK_DISABLED=false because we allowed the default to change."
"If there does exist a valid example where a boolean variable needs to have it's default value changed, [...] it still makes sense from the user perspective to keep static defaults. A new variable would be defined and the old variable deprecated."
Arguments in favor of adopting Position A for non-environment variable (e.g. declarative configuration) usages are mentioned on this comment and this comment:
The boolean env var convention is sensible enough, and following it when introducing new component properties (i.e. not env vars) is the path of least resistance for contributors.
having different conventions for different configuration interfaces (env vars vs. programmatic) is a bad design. I'd like to see us consistent (to the extent it makes sense),
Arguments in favour of Position B include:
This is inconsistent with other parts of the ecosystem including the Collector, the Java Agent and .NET (see below for usages). Some examples of 'enabled-by-default but not named disabled configuration toggles in the Collector are listed here.
This leads to poorer discoverability: users don't know whether a configuration flag is named e.g. disabled or enabled if they don't also know what the value of it is.
Position C may not make sense for all usages in the Collector since there may be 'no good default value' for all options or default values may not follow the stabilization framework (e.g. whether people want exemplars on their trace metrics is not a question of stability but rather of resource usage or backend support).
Mentioned around the 33 minute mark This option has the benefits of Position B but avoids changing the default value of settings, which is one of the arguments in favor of Position A.
Original text of the issue before 2025-11-05.
The MeterConfig's disabled parameter (introduced in #3877) conflicts with the Collector convention which is to use enabled (this is not documented, this search shows many places where this is used in the YAML configuration). Using enabled should be considered for consistency across the whole project.
Another argument against disabled: false is that it has a double negative which is harder to parse. IIRC this is the reason we use enabled instead in the Collector configuration.
disabled: false however is more idiomatic for Go because of false being the zero value of booleans.
I edited the original comment to make a summary of the current positions around this topic, their current usages and the main arguments that I am aware of that have been argued for each item. If I forgot or misrepresented something, let me know and I will amend it. If you want to add something new I am also happy to add it.
I also filed #4723 to explicitly say that the guidance surrounding boolean values for environment variables is not applicable to other configuration interfaces. This is not a solution to this issue but, I feel like, is something that has broad agreement.
edit (2025-11-05): I am making a summary of the positions so far as well as the arguments in favor or against. The text on the issue before this date is left under the line. Verbatim quotes are formatted in italics.
Position A: Toggle fields (and other boolean fields) should be named so that the default is false
Description
This is what it is currently done for environment variables (see v1.50.0 version of the spec):
The declarative configuration spec follows this guidance.
Usages
This convention is used in 9 places in the declarative configuration schema v1.0.0-rc.1 (see kitchen sink).
Some of the usages in the Collector, Java Agent and .NET instrumentation accidentally follow this guidance insofar as they are enabled-by-default. See #4344 (comment), #4344 (comment) and #4344 (comment) for full details.
Position B: Toggle fields should be named
enabled, regardless of the default valueDescription
All boolean configuration flags should be named
enabledregardless of the default value.Usages
The Collector, Java Agent and .NET instrumentation de facto follow this position. See #4344 (comment), #4344 (comment) and #4344 (comment) for full details. There is one exception for the Collector (but, I argue, it is an 'accident' and not intentional).
Position C: We should have a separate option that defines the default value of fields based on stability
Description
There should be a separate option (e.g.
min_stability) that changes the defaults of instrumentations and other features depending on what stability level we consider them having.Usages
Not currently used.
Arguments in favor and against different positions
Arguments in favor of Position A in the context of environment variables can be found mostly on #2755 (comment). As a summary the arguments espoused were the following (see full comment and context here):
Arguments in favor of adopting Position A for non-environment variable (e.g. declarative configuration) usages are mentioned on this comment and this comment:
Arguments in favour of Position B include:
disabledconfiguration toggles in the Collector are listed here.disabledboolean flags are inconsistent with other parts of the OpenTelemetry ecosystem #4344 (comment)). This was argued for in [configuration] Add exception for 'false default' when there is a double negation #4351.disabledorenabledif they don't also know what the value of it is.Arguments in favor of Position C were mostly discussed on the 2025-10-28 Specification SIG meeting, discussion starts at around 13:18:
Original text of the issue before 2025-11-05.
The
MeterConfig'sdisabledparameter (introduced in #3877) conflicts with the Collector convention which is to useenabled(this is not documented, this search shows many places where this is used in the YAML configuration). Usingenabledshould be considered for consistency across the whole project.Another argument against
disabled: falseis that it has a double negative which is harder to parse. IIRC this is the reason we useenabledinstead in the Collector configuration.disabled: falsehowever is more idiomatic for Go because offalsebeing the zero value of booleans.cc @jack-berg @codeboten
I edited the original comment to make a summary of the current positions around this topic, their current usages and the main arguments that I am aware of that have been argued for each item. If I forgot or misrepresented something, let me know and I will amend it. If you want to add something new I am also happy to add it.
I also filed #4723 to explicitly say that the guidance surrounding boolean values for environment variables is not applicable to other configuration interfaces. This is not a solution to this issue but, I feel like, is something that has broad agreement.
I will wait for further work on this apart from that PR until the OTEPs proposed open-telemetry/opentelemetry.io/pul…