-
Notifications
You must be signed in to change notification settings - Fork 211
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
Integration with log libraries to be able to tag log messages with trace/transaction #520
Comments
I think the most reasonable approach here is to provide hooks for the different logging libraries and document how to use them. Alternatively, we could monkeypatch into the logging libraries, but IMO we should avoid that if there are perfectly fine extension points already provided by the libraries. For the stdlib
IMO, a custom For structlog, providing a custom processor seems the way to go: https://www.structlog.org/en/stable/api.html#module-structlog.processors |
Filters are perfect for this task. I also assumed that I could probably insert the Filter automagically into the root logger and have all the descendent loggers pick it up, unfortunately this does not appear to be the case
So, I'm planning to provide a Filter class that users can add to their logging handlers (as handlers do propagate to descendants). Not as automagical as I might wish, but it will still be pretty trivial to consume. Same with the |
No description provided.
The text was updated successfully, but these errors were encountered: