-
Notifications
You must be signed in to change notification settings - Fork 510
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
Add missing stack frames #3673
base: master
Are you sure you want to change the base?
Add missing stack frames #3673
Conversation
Codecov ReportAttention: Patch coverage is
✅ All tests successful. No failed tests found.
Additional details and impacted files@@ Coverage Diff @@
## master #3673 +/- ##
==========================================
+ Coverage 84.30% 84.36% +0.06%
==========================================
Files 137 137
Lines 14561 14592 +31
Branches 2460 2468 +8
==========================================
+ Hits 12275 12310 +35
+ Misses 1528 1523 -5
- Partials 758 759 +1
|
if "sentry_sdk" in frame.f_code.co_filename: | ||
in_sdk = True |
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.
might be better to use f_globals['__module__']
as this is a pretty weak assertion currently
@@ -1096,6 +1119,73 @@ def exc_info_from_error(error): | |||
return exc_info | |||
|
|||
|
|||
def get_full_stack(): |
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.
should this replace the code in the logging plugin which does similar?
Add a new
init()
optionadd_full_stack
(defaultFalse
), when set toTrue
it will add all the missing frames from the beginning of the execution to the stack trace sent to Sentry.Also adds another option
max_stack_frames
(default100
) to limit the number of frames sent. The limitation is only enforced whenadd_full_stack=True
to not change behavior for existing users.Documentation update: getsentry/sentry-docs#11844
Fixes #3646