diff --git a/CHANGELOG.md b/CHANGELOG.md index b81232b7924..f84a276b297 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,9 @@ release. ### Logs +- Add `Context` as argument to `LogRecordProcessor#onEmit`. + ([#2927](https://github.com/open-telemetry/opentelemetry-specification/pull/2927)) + ### Resource ### Semantic Conventions diff --git a/specification/logs/api.md b/specification/logs/api.md index a3cde5989ba..9367067b219 100644 --- a/specification/logs/api.md +++ b/specification/logs/api.md @@ -179,7 +179,8 @@ fields: - [Timestamp](./data-model.md#field-timestamp) - [Observed Timestamp](./data-model.md#field-observedtimestamp) -- [Trace Context](./data-model.md#trace-context-fields) +- [Context](../context/README.md) + including [TraceContext](./data-model.md#trace-context-fields) - [Severity Number](./data-model.md#field-severitynumber) - [Severity Text](./data-model.md#field-severitytext) - [Body](./data-model.md#field-body) diff --git a/specification/logs/sdk.md b/specification/logs/sdk.md index 38caf5bd976..a537aa8093f 100644 --- a/specification/logs/sdk.md +++ b/specification/logs/sdk.md @@ -179,6 +179,10 @@ therefore it SHOULD NOT block or throw exceptions. * `logRecord` - a [ReadWriteLogRecord](#readwritelogrecord) for the emitted `LogRecord`. +* `context` - the `Context` that the SDK determined (the explicitly + passed `Context`, the current `Context`, or an empty `Context` if + the [Logger](./api.md#get-a-logger) was obtained + with `include_trace_context=false`) **Returns:** `Void`