diff --git a/CHANGELOG.md b/CHANGELOG.md index a19a6fcce5d..1c01890a9c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -55,6 +55,8 @@ release. ([#4746](https://github.com/open-telemetry/opentelemetry-specification/pull/4746)) - Allow instrument `Enabled` implementation to have additional optimizations and features. ([#4747](https://github.com/open-telemetry/opentelemetry-specification/pull/4747)) +- Stabilize part of `Enabled` SDK for synchronous instruments. + ([#4787](https://github.com/open-telemetry/opentelemetry-specification/pull/4787)) ### Logs diff --git a/specification/metrics/sdk.md b/specification/metrics/sdk.md index ef9315348e5..e1537668ef8 100644 --- a/specification/metrics/sdk.md +++ b/specification/metrics/sdk.md @@ -872,6 +872,10 @@ It consists of the following parameters: is [Enabled](./api.md#enabled). See [Instrument Enabled](#instrument-enabled) for details. +It is not necessary for implementations to ensure that changes to any of these +parameters are immediately visible to callers of `Enabled`. +However, the changes MUST be eventually visible. + ### Duplicate instrument registration A _duplicate instrument registration_ occurs when more than one Instrument of @@ -997,13 +1001,12 @@ must be retained. ### Instrument enabled -**Status**: [Development](../document-status.md) - -The instrument [`Enabled`](./api.md#enabled) MUST return `false` when either: +The synchronous instrument [`Enabled`](./api.md#enabled) MUST return `false` +when either: -* The [MeterConfig](#meterconfig) of the `Meter` used to create the instrument - has parameter `disabled=true`. -* All [resolved views](#measurement-processing) for the instrument are +- **Status**: [Development](../document-status.md) - The [MeterConfig](#meterconfig) + of the `Meter` used to create the instrument has parameter `disabled=true`. +- All [resolved views](#measurement-processing) for the instrument are configured with the [Drop Aggregation](#drop-aggregation). Otherwise, it SHOULD return `true`. @@ -1013,10 +1016,6 @@ Note: If a user makes no configuration changes, `Enabled` returns `true` since b default `MeterConfig.disabled=false` and instruments use the default aggregation when no matching views match the instrument. -It is not necessary for implementations to ensure that changes -to `MeterConfig.disabled` are immediately visible to callers of `Enabled`. -However, the changes MUST be eventually visible. - ## Attribute limits **Status**: [Stable](../document-status.md) diff --git a/specification/trace/sdk.md b/specification/trace/sdk.md index f314204672e..d90f80cc86e 100644 --- a/specification/trace/sdk.md +++ b/specification/trace/sdk.md @@ -212,9 +212,9 @@ It consists of the following parameters: is [Enabled](./api.md#enabled). If `disabled` is `true`, `Enabled` returns `false`. If `disabled` is `false`, `Enabled` returns `true`. - It is not necessary for implementations to ensure that changes to `disabled` - are immediately visible to callers of `Enabled`. - However, the changes MUST be eventually visible. +It is not necessary for implementations to ensure that changes to any of these +parameters are immediately visible to callers of `Enabled`. +However, the changes MUST be eventually visible. ### Enabled