-
Notifications
You must be signed in to change notification settings - Fork 327
Make sure the error context is always set #114
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
Previously, most of the transaction context was set after the execution of a request. When capturing an exception, the transaction context is copied over at it's current state. That means when the user captures an exception, the the transaction context is not yet populated and therefore, the Error context is empty. This changes the initialization of the transaction context so that it is set before the request starts. That way, we can be sure that the Error context is always set
|
Hey @beniwohli, could you review the comments in the commit message and in |
Codecov Report
@@ Coverage Diff @@
## master #114 +/- ##
============================================
+ Coverage 76.73% 77.08% +0.34%
- Complexity 947 953 +6
============================================
Files 99 99
Lines 3280 3282 +2
Branches 291 289 -2
============================================
+ Hits 2517 2530 +13
+ Misses 602 600 -2
+ Partials 161 152 -9
Continue to review full report at Codecov.
|
5085ff6 to
5a49986
Compare
beniwohli
left a comment
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.
@felixbarny looks good! It's still not quite the same behavior as the Python (and AFAIK most other) agent, but close enough 👍
|
Thanks for having a look :) |
Previously, most of the transaction context was set after the execution of a request.
When capturing an exception, the transaction context is copied over at its current state.
That means when the user captures an exception, the transaction context is not yet
populated and therefore, the Error context is empty.
This changes the initialization of the transaction context so that it is set
before the request starts.
That way, we can be sure that the Error context is always set