-
-
Notifications
You must be signed in to change notification settings - Fork 231
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
[QUESTION] Is merge_contextvars
required in the processor chain for AsyncBoundLogger
or not?
#346
Comments
Wow, this is super interesting and most likely related to #302! It's kinda hilarious that the screwed up markup probably saved us from many broken deployments! 😅 It would be great if @eladnam could weight in real quick, because I understand why structlog/src/structlog/stdlib.py Lines 478 to 482 in 4c19f0c
merge_contextvars works now when it didn't before!? 🤯
|
Part of my fix was to send the context to the thread pool executor used in the async logger (the @hynek i think you can simply remove the outdated warning, |
(that was invisible due to bad markup) ref #346
Wonderful, thank you @eladnam! |
From
AsyncBoundLogger
's docstring (FYI, the warning is not rendered on the API reference page):Following the aforementioned warning, if I remove
structlog.contextvars.merge_contextvars
from my processor chain, none of the context variables (added usingstructlog.contextvars.bind_contextvars
) are displayed in the log records. Only if I add it to the processor chain, context variables are displayed. Am I doing something wrong?My
structlog
related code:Python version:
3.9.6
structlog
version:21.1.0
If any more info is required from my end, let me know, I'll provide it.
The text was updated successfully, but these errors were encountered: