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

Add missing stack frames #3673

Merged
merged 19 commits into from
Dec 5, 2024
Merged

Conversation

antonpirker
Copy link
Member

@antonpirker antonpirker commented Oct 18, 2024

Add a new init() option add_full_stack (default False), when set to True 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 (default 100) to limit the number of frames sent. The limitation is only enforced when add_full_stack=True to not change behavior for existing users.

Documentation update: getsentry/sentry-docs#11844

Fixes #3646

Copy link

codecov bot commented Oct 19, 2024

Codecov Report

Attention: Patch coverage is 94.44444% with 1 line in your changes missing coverage. Please review.

Project coverage is 79.95%. Comparing base (e7130e8) to head (9f8bc18).
Report is 7 commits behind head on master.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
sentry_sdk/utils.py 93.75% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3673      +/-   ##
==========================================
+ Coverage   79.94%   79.95%   +0.01%     
==========================================
  Files         137      137              
  Lines       15421    15437      +16     
  Branches     2614     2619       +5     
==========================================
+ Hits        12328    12343      +15     
  Misses       2223     2223              
- Partials      870      871       +1     
Files with missing lines Coverage Δ
sentry_sdk/consts.py 93.27% <100.00%> (+0.06%) ⬆️
sentry_sdk/utils.py 83.96% <93.75%> (+0.15%) ⬆️

... and 2 files with indirect coverage changes

@antonpirker antonpirker self-assigned this Oct 21, 2024
@BYK BYK changed the title Add missing stack trames Add missing stack frames Oct 24, 2024
sentry_sdk/utils.py Outdated Show resolved Hide resolved
sentry_sdk/utils.py Outdated Show resolved Hide resolved
Copy link
Member

@asottile-sentry asottile-sentry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while the implementation seems fine -- I'm not sure this is going to be super useful being a global option -- I would imagine this is going to be more useful on a callsite-by-callsite basis?

@antonpirker antonpirker merged commit cda5127 into master Dec 5, 2024
136 checks passed
@antonpirker antonpirker deleted the antonpirker/missing-stack-trames branch December 5, 2024 13:29
antonpirker added a commit to getsentry/sentry-docs that referenced this pull request Dec 6, 2024
…11844)

Documentation of two new options that where introduced here: getsentry/sentry-python#3673

---------

Co-authored-by: Liza Mock <liza.mock@sentry.io>
Lms24 pushed a commit to getsentry/sentry-docs that referenced this pull request Dec 13, 2024
…11844)

Documentation of two new options that where introduced here: getsentry/sentry-python#3673

---------

Co-authored-by: Liza Mock <liza.mock@sentry.io>
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.

Missing execution stack and output for handled errors
2 participants