diff --git a/CHANGELOG.md b/CHANGELOG.md index f54b01b01f1..63429ecf285 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,8 @@ release. ([#4802](https://github.com/open-telemetry/opentelemetry-specification/pull/4802)) - Declarative configuration: clarify Registry ComponentProvider `type` parameter ([#4799](https://github.com/open-telemetry/opentelemetry-specification/pull/4799)) +- Swap Tracer/Meter/LoggerConfig `disabled` for `enabled` to avoid double negatives + ([#4823](https://github.com/open-telemetry/opentelemetry-specification/pull/4823)) ### Common diff --git a/specification/logs/sdk.md b/specification/logs/sdk.md index 3cdd1157a55..be0966d742d 100644 --- a/specification/logs/sdk.md +++ b/specification/logs/sdk.md @@ -186,9 +186,9 @@ the `Logger` MUST be updated to behave according to the new `LoggerConfig`. A `LoggerConfig` defines various configurable aspects of a `Logger`'s behavior. It consists of the following parameters: -* `disabled`: A boolean indication of whether the logger is enabled. +* `enabled`: A boolean indication of whether the logger is enabled. - If not explicitly set, the `disabled` parameter SHOULD default to `false` ( + If not explicitly set, the `enabled` parameter SHOULD default to `true` ( i.e. `Logger`s are enabled by default). If a `Logger` is disabled, it MUST behave equivalently @@ -245,7 +245,7 @@ emitting the record): - there are no registered [`LogRecordProcessors`](#logrecordprocessor). - **Status**: [Development](../document-status.md) - `Logger` is disabled - ([`LoggerConfig.disabled`](#loggerconfig) is `true`). + ([`LoggerConfig.enabled`](#loggerconfig) is `false`). - **Status**: [Development](../document-status.md) - the provided severity is specified (i.e. not `0`) and is less than the configured `minimum_severity` in the [`LoggerConfig`](#loggerconfig). diff --git a/specification/metrics/sdk.md b/specification/metrics/sdk.md index e1537668ef8..c5b27d72f1b 100644 --- a/specification/metrics/sdk.md +++ b/specification/metrics/sdk.md @@ -860,15 +860,15 @@ the `Meter` MUST be updated to behave according to the new `MeterConfig`. A `MeterConfig` defines various configurable aspects of a `Meter`'s behavior. It consists of the following parameters: -* `disabled`: A boolean indication of whether the Meter is enabled. +* `enabled`: A boolean indication of whether the Meter is enabled. - If not explicitly set, the `disabled` parameter SHOULD default to `false` ( + If not explicitly set, the `enabled` parameter SHOULD default to `true` ( i.e. `Meter`s are enabled by default). If a `Meter` is disabled, it MUST behave equivalently to [No-op Meter](./noop.md#meter). - The value of `disabled` MUST be used to resolve whether an instrument + The value of `enabled` MUST be used to resolve whether an instrument is [Enabled](./api.md#enabled). See [Instrument Enabled](#instrument-enabled) for details. @@ -1005,7 +1005,7 @@ The synchronous instrument [`Enabled`](./api.md#enabled) MUST return `false` when either: - **Status**: [Development](../document-status.md) - The [MeterConfig](#meterconfig) - of the `Meter` used to create the instrument has parameter `disabled=true`. + of the `Meter` used to create the instrument has parameter `enabled=false`. - All [resolved views](#measurement-processing) for the instrument are configured with the [Drop Aggregation](#drop-aggregation). @@ -1013,7 +1013,7 @@ Otherwise, it SHOULD return `true`. It MAY return `false` to support additional optimizations and features. Note: If a user makes no configuration changes, `Enabled` returns `true` since by -default `MeterConfig.disabled=false` and instruments use the default +default `MeterConfig.enabled=true` and instruments use the default aggregation when no matching views match the instrument. ## Attribute limits diff --git a/specification/trace/sdk.md b/specification/trace/sdk.md index 810f554ec9f..16d714b7c2d 100644 --- a/specification/trace/sdk.md +++ b/specification/trace/sdk.md @@ -200,17 +200,17 @@ the `Tracer` MUST be updated to behave according to the new `TracerConfig`. A `TracerConfig` defines various configurable aspects of a `Tracer`'s behavior. It consists of the following parameters: -* `disabled`: A boolean indication of whether the Tracer is enabled. +* `enabled`: A boolean indication of whether the Tracer is enabled. - If not explicitly set, the `disabled` parameter SHOULD default to `false` ( + If not explicitly set, the `enabled` parameter SHOULD default to `true` ( i.e. `Tracer`s are enabled by default). If a `Tracer` is disabled, it MUST behave equivalently to a [No-op Tracer](./api.md#behavior-of-the-api-in-the-absence-of-an-installed-sdk). - The value of `disabled` MUST be used to resolve whether a `Tracer` - is [Enabled](./api.md#enabled). If `disabled` is `true`, `Enabled` - returns `false`. If `disabled` is `false`, `Enabled` returns `true`. + The value of `enabled` MUST be used to resolve whether a `Tracer` + is [Enabled](./api.md#enabled). If `enabled` is `false`, `Enabled` + returns `false`. If `enabled` is `true`, `Enabled` returns `true`. It is not necessary for implementations to ensure that changes to any of these parameters are immediately visible to callers of `Enabled`. @@ -223,7 +223,7 @@ However, the changes MUST be eventually visible. `Enabled` MUST return `false` when either: - there are no registered [`SpanProcessors`](#span-processor), -- `Tracer` is disabled ([`TracerConfig.disabled`](#tracerconfig) is `true`). +- `Tracer` is disabled ([`TracerConfig.enabled`](#tracerconfig) is `false`). Otherwise, it SHOULD return `true`. It MAY return `false` to support additional optimizations and features.