diff --git a/CHANGELOG.md b/CHANGELOG.md index a6736c4a58e..fb2d15aae45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,9 @@ release. ### Metrics +- Add normative language to the Metrics API/SDK spec concurrency requirements. + ([#4868](https://github.com/open-telemetry/opentelemetry-specification/pull/4868)) + ### Logs - Add optional `Exception` parameter to Emit LogRecord. diff --git a/specification/metrics/api.md b/specification/metrics/api.md index 1d91baab7b7..c37fccc944d 100644 --- a/specification/metrics/api.md +++ b/specification/metrics/api.md @@ -1342,12 +1342,14 @@ APIs without introducing breaking changes, if possible. For languages which support concurrent execution the Metrics APIs provide specific guarantees and safeties. -**MeterProvider** - all methods are safe to be called concurrently. +**MeterProvider** - all methods MUST be documented that implementations need to +be safe for concurrent use by default. -**Meter** - all methods are safe to be called concurrently. +**Meter** - all methods MUST be documented that implementations need to be safe +for concurrent use by default. -**Instrument** - All methods of any Instrument are safe to be called -concurrently. +**Instrument** - all methods MUST be documented that implementations need to be +safe for concurrent use by default. ## References diff --git a/specification/metrics/sdk.md b/specification/metrics/sdk.md index c5b27d72f1b..0c3da4b83fc 100644 --- a/specification/metrics/sdk.md +++ b/specification/metrics/sdk.md @@ -1847,15 +1847,15 @@ existing methods without introducing breaking changes, if possible. For languages which support concurrent execution the Metrics SDKs provide specific guarantees and safeties. -**MeterProvider** - Meter creation, `ForceFlush` and `Shutdown` are safe to be -called concurrently. +**MeterProvider** - Meter creation, `ForceFlush` and `Shutdown` MUST be safe +to be called concurrently. -**ExemplarReservoir** - all methods are safe to be called concurrently. +**ExemplarReservoir** - all methods MUST be safe to be called concurrently. **MetricReader** - `Collect`, `ForceFlush` (for periodic exporting MetricReader) -and `Shutdown` are safe to be called concurrently. +and `Shutdown` MUST be safe to be called concurrently. -**MetricExporter** - `ForceFlush` and `Shutdown` are safe to be called +**MetricExporter** - `ForceFlush` and `Shutdown` MUST be safe to be called concurrently. ## References