-
Notifications
You must be signed in to change notification settings - Fork 535
fix(integrations): ASGI integration not capture transactions in Websocket #4293
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
Conversation
Hey @guodong000, thank you for this fix -- the current behavior definitely looks incorrect. I'd strongly suggest we add a test case for this so that we don't regress (if we had this in the first place, this never would have broken). Do you have some time to add one to Let me know -- if you don't have the time we can take care of it. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4293 +/- ##
==========================================
+ Coverage 79.50% 80.30% +0.79%
==========================================
Files 142 142
Lines 15907 15926 +19
Branches 2723 2725 +2
==========================================
+ Hits 12647 12789 +142
+ Misses 2391 2262 -129
- Partials 869 875 +6
|
I found that the I checked the code of Then I added some related assertions. |
Can't comment on the specific line because it's not part of the diff but you probably need to change the sentry_init(send_default_pii=True, traces_sample_rate=1.0) And then you should (if everything is working) actually get a separate transaction event here in addition to the message and the error. As is, the test is checking whether the message is associated with a transaction, but not if a transaction event is actually being emitted. |
@sentrivana I have made the changes according to your suggestions. Please take a look. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @guodong000!
fix(integrations): ASGI integration not capture transactions in Websocket
In ASGI Specs,
method
is not in Websocket Connection Scope.