Repository navigation
fix: don't sample events captured while handling a crash - #2269
Merged
Merged
Conversation
tustanivsky
marked this pull request as ready for review
October 28, 2026 17:49
tustanivsky
requested review from
JoshuaMoelans,
jpnurmi and
mujacica
and removed request for
jpnurmi
October 28, 2026 18:26
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #2269 +/- ##
==========================================
- Coverage 75.71% 75.70% -0.01%
==========================================
Files 103 103
Lines 28316 28319 +3
Branches 5208 5210 +2
==========================================
+ Hits 21439 21440 +1
- Misses 5529 5532 +3
+ Partials 1348 1347 -1 🚀 New features to boost your workflow:
|
mujacica
approved these changes
Oct 28, 2026
jpnurmi
approved these changes
Oct 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Events captured while a crash is being handled, e.g. from the
on_crashhook, are no longer dropped bysample_rate. Backends already send crashes without sampling, so an event captured as part of the crash now gets the same treatment.The crash handler nesting depth is tracked in
sentry__enter_crash_handler()/sentry__exit_crash_handler(), and thesample_rateroll insentry__capture_event()is skipped while it is above zero.The depth is process-wide since inproc handles crashes on a separate handler thread, so events captured on other threads while a crash is being handled skip sampling too.
Related to getsentry/sentry-unreal#1667