Request ID is not captured in a loggin queue contex #93
kaiosatiro
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey, this middleware is very handy! Thanks a lot.
I had an issue using it on a queue from the core logging library. The request ID did not appear in the log. I already found my solution. I will post this here, only to help someone, or just in case something needs improvement.
I have a handler that is initiated from "logging.handlers.QueueHandler", and this one receives the other handlers. The correlation ID filter will only be used if I use it on the main queue handler. If I try to use it on the sub-handlers, the default value is used.
This is my log config file:
I had to add the "filters": ["correlation_id"] on the "queue_handler" for work. But for me, that's not a problem.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions