Define data ownership for LogRecordProcessor#2969
Merged
reyang merged 6 commits intoopen-telemetry:mainfrom Dec 2, 2022
Merged
Define data ownership for LogRecordProcessor#2969reyang merged 6 commits intoopen-telemetry:mainfrom
reyang merged 6 commits intoopen-telemetry:mainfrom
Conversation
reyang
reviewed
Nov 21, 2022
reyang
reviewed
Nov 21, 2022
Member
|
We haven't concluded the discussion last time. What are we aiming for here? Chained processors? |
Member
Author
The approach with this PR is to try to resolve the mutability question while maintaining a LogRecordProcessor design as similar as possible to SpanProcessors: LogRecordProcessors are called by the SDK LoggerProvider in the order they were provided. There is no responsibility for a processor to call the next processor (i.e. no chaining). It's not the only approach, but should be a frontrunner in my opinion since its simple to implement, consistent with tracing, and is quite flexible. |
tigrannajaryan
approved these changes
Dec 1, 2022
Member
Author
|
@open-telemetry/specs-logs-approvers please take a look. |
reyang
approved these changes
Dec 2, 2022
25 tasks
carlosalberto
pushed a commit
to carlosalberto/opentelemetry-specification
that referenced
this pull request
Oct 31, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #2955.
States that
LogRecordProcessor#onEmitcan modifylogRecorduntil it returns. If a reference tologRecordis held afteronEmitreturns, only reads are permitted.If a processor wants to do asynchronous modification it needs to first make a copy is responsible for calling any downstream processors / exporters that expect to see the changes. Described more here.