diff --git a/CHANGELOG.md b/CHANGELOG.md index d7c049d5125..2556fb6ed75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,8 @@ release. - Add optional `Exception` parameter to Emit LogRecord. ([#4824](https://github.com/open-telemetry/opentelemetry-specification/pull/4824)) +- Add normative language to the Logging API/SDK spec concurrency requirements. + ([#4885](https://github.com/open-telemetry/opentelemetry-specification/pull/4885)) ### Baggage diff --git a/specification/logs/api.md b/specification/logs/api.md index 13359d83857..aeaa2c632b0 100644 --- a/specification/logs/api.md +++ b/specification/logs/api.md @@ -169,9 +169,11 @@ provide it. For languages which support concurrent execution the Logs APIs provide specific guarantees and safeties. -**LoggerProvider** - all methods are safe to be called concurrently. +**LoggerProvider** - all methods MUST be documented that implementations need to +be safe for concurrent use by default. -**Logger** - all methods are safe to be called concurrently. +**Logger** - all methods MUST be documented that implementations need to +be safe for concurrent use by default. ## Ergonomic API diff --git a/specification/logs/sdk.md b/specification/logs/sdk.md index db3af5f6d21..3c33110c084 100644 --- a/specification/logs/sdk.md +++ b/specification/logs/sdk.md @@ -41,6 +41,7 @@ weight: 3 + [Export](#export) + [ForceFlush](#forceflush-2) + [Shutdown](#shutdown-1) +- [Concurrency requirements](#concurrency-requirements) @@ -643,3 +644,18 @@ and the destination is unavailable). [OpenTelemetry SDK](../overview.md#sdk) authors MAY decide if they want to make the shutdown timeout configurable. - [OTEP0150 Logging Library SDK Prototype Specification](../../oteps/logs/0150-logging-library-sdk.md) + +## Concurrency requirements + +**Status**: [Stable](../document-status.md) + +For languages which support concurrent execution the Logging SDKs provide +specific guarantees and safeties. + +**LoggerProvider** - Logger creation, `ForceFlush` and `Shutdown` MUST be safe +to be called concurrently. + +**Logger** - all methods MUST be safe to be called concurrently. + +**LogRecordExporter** - `ForceFlush` and `Shutdown` MUST be safe to be called +concurrently.