Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log record mutations are visible in next registered processors #4067

Merged
merged 35 commits into from
Sep 4, 2024
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
3d6d388
Log record mutations do not have to be visible in next registered pro…
pellared Jun 4, 2024
36f21b4
Update changelog
pellared Jun 4, 2024
387e872
Wording fixes
pellared Jun 4, 2024
6063663
Reword for consistency
pellared Jun 4, 2024
20e6a1b
Merge branch 'main' into log-processor-chaining
pellared Jun 5, 2024
6d9663e
Merge branch 'main' into log-processor-chaining
pellared Jun 10, 2024
6c201a6
Merge branch 'main' into log-processor-chaining
pellared Jun 12, 2024
d7d8687
Merge branch 'main' into log-processor-chaining
pellared Jun 18, 2024
028766e
Update CHANGELOG.md
pellared Jun 18, 2024
876024d
Apply suggestions from code review
pellared Jun 21, 2024
0d607e2
Format
pellared Jun 21, 2024
4d0d7f5
Merge branch 'open-telemetry:main' into log-processor-chaining
pellared Jun 27, 2024
6f83be7
Merge branch 'main' into log-processor-chaining
pellared Jun 27, 2024
0730967
Apply suggestions from code review
pellared Jun 28, 2024
57d6e53
Merge branch 'main' into log-processor-chaining
pellared Jul 2, 2024
2332ae9
Merge branch 'main' into log-processor-chaining
pellared Jul 9, 2024
cf60ced
Merge branch 'main' into log-processor-chaining
pellared Jul 10, 2024
15d958c
Merge branch 'main' into log-processor-chaining
pellared Jul 12, 2024
5e3b91c
Recommend sharing log record but allow exceptions
pellared Jul 12, 2024
505cffb
Update changelog
pellared Jul 12, 2024
5adfbb4
Merge branch 'main' into log-processor-chaining
pellared Jul 16, 2024
917fea4
Merge branch 'main' into log-processor-chaining
pellared Jul 18, 2024
d2847c2
Update sdk.md
pellared Aug 1, 2024
0d739cb
Update CHANGELOG.md
pellared Aug 1, 2024
225a497
Merge branch 'main' into log-processor-chaining
pellared Aug 1, 2024
711ca57
Update sdk.md
pellared Aug 1, 2024
514e379
Update CHANGELOG.md
pellared Aug 1, 2024
a5a05cf
Merge branch 'main' into log-processor-chaining
pellared Aug 1, 2024
2d5ee1c
Merge branch 'main' into log-processor-chaining
cijothomas Aug 6, 2024
035fe9b
Merge branch 'main' into log-processor-chaining
pellared Aug 17, 2024
f680e40
Merge branch 'main' into log-processor-chaining
cijothomas Aug 21, 2024
d0f36a8
Merge branch 'main' into log-processor-chaining
cijothomas Aug 27, 2024
0119401
Merge branch 'main' into log-processor-chaining
pellared Aug 27, 2024
970a83f
Merge branch 'main' into log-processor-chaining
pellared Sep 2, 2024
b8367da
Merge branch 'main' into log-processor-chaining
cijothomas Sep 3, 2024
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 @@ -25,6 +25,8 @@ release.

- Add the in-development `Enabled` API to the `Logger`.
([#4020](https://github.com/open-telemetry/opentelemetry-specification/pull/4020))
- Log record mutations do not have to be visible in next registered processors. Allow chaining processors and having the log record modifications local.
([#4067](https://github.com/open-telemetry/opentelemetry-specification/pull/4067))

### Events

Expand Down
19 changes: 16 additions & 3 deletions specification/logs/sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,22 @@ therefore it SHOULD NOT block or throw exceptions.

**Returns:** `Void`

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.
It is implementation specific whether and how the `logRecord` passed by the SDK
is shared between the processors. Log record mutations do not have to be visible
in next registered processors.
pellared marked this conversation as resolved.
Show resolved Hide resolved

If the `logRecord` is shared, then a `LogRecordProcessor` may freely modify
pellared marked this conversation as resolved.
Show resolved Hide resolved
`logRecord` only for the duration of the `OnEmit` call.
The modifications applied on shared data are visible in next
pellared marked this conversation as resolved.
Show resolved Hide resolved
registered processors.
If `logRecord` is needed after `OnEmit` returns (i.e. for asynchronous
pellared marked this conversation as resolved.
Show resolved Hide resolved
processing) only reads are permitted.
pellared marked this conversation as resolved.
Show resolved Hide resolved

carlosalberto marked this conversation as resolved.
Show resolved Hide resolved
If the `logRecord` is not shared, then modifications applied on the `logRecord`
pellared marked this conversation as resolved.
Show resolved Hide resolved
are local.
If the modification is needed in another processor,
then the processor making the modification needs to call the other processor's
`OnEmit` and pass the locally modified `logRecord`.

pellared marked this conversation as resolved.
Show resolved Hide resolved
#### ShutDown

Expand Down
Loading