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

fix: Preserve contextvars in aiohttp integration #674

Merged
merged 1 commit into from Apr 20, 2020
Merged

fix: Preserve contextvars in aiohttp integration #674

merged 1 commit into from Apr 20, 2020

Conversation

H--o-l
Copy link
Contributor

@H--o-l H--o-l commented Apr 20, 2020

aiohttp integration currently re-create a task to encapsulate the request
handler.
But:

  • aiohttp already does it.
  • contextvars created in it can't be read by aiohttp.
    It's an issue for users custom logger.

Fix #670

@untitaker
Copy link
Member

You can inline inner() into the outer function now

aiohttp integration currently re-create a task to encapsulate the request
handler.
But:
- aiohttp already does it.
- contextvars created in it can't be read by aiohttp.
  It's an issue for users custom logger.

Fix #670
@H--o-l
Copy link
Contributor Author

H--o-l commented Apr 20, 2020

@untitaker Ok, something like what I just push?

@untitaker untitaker merged commit d617e54 into getsentry:master Apr 20, 2020
@untitaker
Copy link
Member

Perfect, thanks!

@H--o-l H--o-l deleted the fix/contextvars-aiohttp-exception branch April 21, 2020 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

aiohttp integration ability to use contextvars in logger
2 participants