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

[DoNotMerge] ReadableLogRecord is able to access the passed context #3908

Closed
wants to merge 3 commits into from

Conversation

pellared
Copy link
Member

@pellared pellared commented Feb 27, 2024

Related to #3907

Changes

Clarify that ReadableLogRecord is able to access all information added via "Emit a log record".

This is needed so that the SDK is able to get access to the passed Context (https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/bridge-api.md#emit-a-logrecord) which can contain e.g. some baggage that may want to be used e.g. by custom processors.

I think that the original intention of the spec authors was "Emit a Record" as "LogRecord" data model already defined fields that are later defined in ReadableLogRecord (e.g. Instrumentation Scope, Resource).

@pellared pellared marked this pull request as ready for review February 27, 2024 09:33
@pellared pellared requested review from a team February 27, 2024 09:33
Copy link
Member

@tigrannajaryan tigrannajaryan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, this was the initial intent and I consider this to be a spec bug, so fixing it is not a breaking change.

@pellared
Copy link
Member Author

@jack-berg pointed out that processor has access to the Context via a separate argument: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/logs/sdk.md#onemit

I think that my PR would do more harm than benefits.

I am considering closing this PR.

@pellared pellared changed the title ReadableLogRecord is able to access the passed context [DoNotMerge] ReadableLogRecord is able to access the passed context Feb 27, 2024
@pellared pellared closed this Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants