Skip to content

Commit

Permalink
Make context available in log record processor onEmit (#2927)
Browse files Browse the repository at this point in the history
  • Loading branch information
jack-berg committed Nov 9, 2022
1 parent 374c34c commit c0b850f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion specification/logs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions specification/logs/sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down

0 comments on commit c0b850f

Please sign in to comment.