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

Support for exporter logging contextual information #5962

Closed
mcmho opened this issue Aug 25, 2022 · 2 comments
Closed

Support for exporter logging contextual information #5962

mcmho opened this issue Aug 25, 2022 · 2 comments
Labels

Comments

@mcmho
Copy link
Contributor

mcmho commented Aug 25, 2022

Is your feature request related to a problem? Please describe.
The problem is log messages emitted by the exporters have limited context. With thousands of signals coming from various spans and traces, logs can soon becomes very difficult to correlate.
It would be great to add contextual information, such as traceparent, traceid, span id, .., such contextual information in the log message to enrich message context.

Describe the solution you'd like
For the benefit of correlating logs with better context, the solution is to add traceparent id, span id and/or trace id
as part of the log message.

Potentially, we can wrap zap api like this in which it takes Context as the first parameter and any contextual information can be provided there to the logger:
https://github.com/juju/zaputil/blob/ef53049637acba748be33edc4a93e51bf738b11b/zapctx/zapctx.go#L106

another similar idea: https://github.com/uptrace/opentelemetry-go-extra/tree/main/otelzap

Describe alternatives you've considered
Alternately, I don't know how generic we want to make this improvement.
There is also a discussion going on zap that there are many interests to support logging contextual information:
uber-go/zap#654
Assuming a solution to the above issue can be provided timely, we can make use of this improved version of zap.

@bogdandrutu
Copy link
Member

I would not invent a new logging API for the moment. Also waiting to see what logging SIG proposes.

@mcmho
Copy link
Contributor Author

mcmho commented Aug 26, 2022

thanks @bogdandrutu! "logging SIG"... you are referring to uber-go/zap?

@github-actions github-actions bot added the Stale label Aug 26, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants