-
Notifications
You must be signed in to change notification settings - Fork 829
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
Pass parentContext to LogProcessor.emit(), similar to SpanProcessor.onStart() #4147
Comments
@trask I think you can do this today as long as the log processing is happening on the same thread and in the same context as when the log was recorded. I believe we already rely on that assumption for the log4j, logback, and jul appenders. For example here we just call As far as i can tell, this was really blocked by
|
👍 I think it may still be good to pass in the |
An alternative to changing the signature of |
should the blocked:spec label be removed from this issue? |
The Log SDK spec
There's an effort to try to identify / resolve the remaining issues needed to stabilize logs, and this specific topic was included: "Consider the need for passing context as a parameter to LogRecordProcessor (from @jack-berg)". I'll be making a PR to the spec with the change, and anticipate folks will agree, so its just a matter of timing of whether to push forward with this now or wait. |
E.g. store the context passed in to
LogDataBuilder.setContext()
(and removesetSpanContext()
), and pass that context along toLogProcessor.emit()
.This would enable writing a LogProcessor that adds Baggage attributes to the log telemetry (and probably other use cases).
The text was updated successfully, but these errors were encountered: