-
Notifications
You must be signed in to change notification settings - Fork 527
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
Django ASGI based async views do not create Transactions #3142
Labels
Comments
Update: issue appears to be the same for both, I likely had changed something more than just async/sync when I reached this conclusion |
szokeasaurusrex
added a commit
to szokeasaurusrex/issue-reproductions
that referenced
this issue
Jun 11, 2024
sentrivana
pushed a commit
that referenced
this issue
Jun 19, 2024
Cleaning up the ASGI tests for Django. Making sure it is always `wait()`ed for the application to finish and also made the tests a bit more readable and removed some useless asserts. Fixes #3142
arjennienhuis
pushed a commit
to arjennienhuis/sentry-python
that referenced
this issue
Sep 30, 2024
Cleaning up the ASGI tests for Django. Making sure it is always `wait()`ed for the application to finish and also made the tests a bit more readable and removed some useless asserts. Fixes getsentry#3142
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If there is an async view in Django then a transaction should be created for that view.
It seems that this is not the case right now: https://github.com/getsentry/sentry-python/blob/antonpirker/trace-origin-in-integrations/tests/integrations/django/asgi/test_asgi.py#L340
The view triggered in the linked test above should create a transaction.
There was a change in Django that we missed: #3141
We need to make sure that async views in Django emit transactions:
channels.http.AsgiHandler
is monkey patched to start transactions)django.core.handlers.asgi.ASGIHandler
only available in Django 3.0+)Make sure this works in old Django (<3.0) and also newer Djangos. When checking newer Djangos make sure it works when using Channels or Djangos built in ASGI handler.
The text was updated successfully, but these errors were encountered: