diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f186ae5a23..7ad8acd3c28 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,9 @@ release. ### Metrics +- Allow instrument `Enabled` implementation to have additional optimizations and features. + ([#4747](https://github.com/open-telemetry/opentelemetry-specification/pull/4747)) + ### Logs - Stabilize `LogRecordProcessor.Enabled`. diff --git a/specification/metrics/sdk.md b/specification/metrics/sdk.md index 06af7a1068a..9c8736353ae 100644 --- a/specification/metrics/sdk.md +++ b/specification/metrics/sdk.md @@ -999,14 +999,16 @@ must be retained. **Status**: [Development](../document-status.md) -The instrument [Enabled](./api.md#enabled) operation MUST return `false` if any -of the following conditions are true, and `true` otherwise: +The 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 configured with the [Drop Aggregation](#drop-aggregation). +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 aggregation when no matching views match the instrument.