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 ability to skip frames #852

Merged
merged 6 commits into from
Jul 10, 2024
Merged

Add ability to skip frames #852

merged 6 commits into from
Jul 10, 2024

Conversation

ribice
Copy link
Collaborator

@ribice ribice commented Jul 3, 2024

I don't find this solution elegant in particular, but it adds ability to skipFrames in StackTrace (which resolves #741 for example).

Is EventFromMessage invoked directly by external users? If so, this would be a breaking change and instead a variadic options/parameter could be added.

I'll add tests once we agree on the implementation.

@ribice ribice requested a review from cleptric July 3, 2024 12:23
Copy link

codecov bot commented Jul 3, 2024

Codecov Report

Attention: Patch coverage is 86.36364% with 3 lines in your changes missing coverage. Please review.

Project coverage is 82.05%. Comparing base (dafeb07) to head (4701327).

Files Patch % Lines
stacktrace.go 85.71% 1 Missing and 1 partial ⚠️
client.go 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #852      +/-   ##
==========================================
- Coverage   82.09%   82.05%   -0.04%     
==========================================
  Files          51       51              
  Lines        4518     4520       +2     
==========================================
  Hits         3709     3709              
- Misses        661      662       +1     
- Partials      148      149       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cleptric
Copy link
Member

cleptric commented Jul 3, 2024

I fear this is something we would need to expose on the top level methods too :/
So CaptureMessage, CaptureException and most likely Recover too, to be truly useful.
An variadic options argument might be the better way forward.

@ribice ribice marked this pull request as ready for review July 9, 2024 16:15
@ribice
Copy link
Collaborator Author

ribice commented Jul 9, 2024

I fear this is something we would need to expose on the top level methods too :/ So CaptureMessage, CaptureException and most likely Recover too, to be truly useful. An variadic options argument might be the better way forward.

I've added it to CaptureMessage, CaptureEvent, Recover/RecoverWithContext.

@cleptric cleptric merged commit d95747f into master Jul 10, 2024
21 checks passed
@cleptric cleptric deleted the skip-frames branch July 10, 2024 11:19
cleptric added a commit that referenced this pull request Sep 8, 2024
This reverts commit d95747f.

# Conflicts:
#	CHANGELOG.md
#	stacktrace.go
cleptric added a commit that referenced this pull request Sep 9, 2024
This reverts commit d95747f.

# Conflicts:
#	CHANGELOG.md
#	stacktrace.go
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.

Stack trace has confusing top frame when using sentry.CurrentHub().Recover(err)
2 participants