Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ release.

### Logs

- Improve concurrency safety description of `LogRecordProcessor.OnEmit`.
([#4578](https://github.com/open-telemetry/opentelemetry-specification/pull/4578))
- Clarify that `SeverityNumber` values are used when comparing severities.
([#4552](https://github.com/open-telemetry/opentelemetry-specification/pull/4552))

Expand Down
11 changes: 7 additions & 4 deletions specification/logs/sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ the following information added to the [LogRecord](data-model.md#log-and-event-r
The SDK MAY provide an operation that makes a deep clone of a `ReadWriteLogRecord`.
The operation can be used by asynchronous processors (e.g. [Batching processor](#batching-processor))
to avoid race conditions on the log record that is not required to be
concurrent safe.
concurrent-safe.

## LogRecord Limits

Expand Down Expand Up @@ -350,9 +350,12 @@ therefore it SHOULD NOT block or throw exceptions.
For a `LogRecordProcessor` registered directly on SDK `LoggerProvider`,
the `logRecord` mutations MUST be visible in next registered processors.

A `LogRecordProcessor` may freely modify `logRecord` for the duration of
the `OnEmit` call. If `logRecord` is needed after `OnEmit` returns (i.e. for
asynchronous processing) only reads are permitted.
A `LogRecordProcessor` may freely modify the `logRecord` for the duration of
the `OnEmit` call. However, it is OPTIONAL for `ReadWriteLogRecord` to be
concurrent-safe. Therefore, any concurrent modifications and reads of `logRecord`
may result in race conditions. To avoid such race conditions,
implementations SHOULD recommended to users that a clone of `logRecord` be used
for any concurrent processing, such as in a [batching processor](#batching-processor).

#### Enabled

Expand Down
Loading