fix: skip screenshot capture on dropped events#2661
Merged
bitsandfoxes merged 7 commits intomainfrom May 6, 2026
Merged
Conversation
The previous test called processor.Process() directly, bypassing DoSendEvent entirely. It passed after the WasCaptured fix only because the flag defaults to false — not because DoSendEvent actively left it false after before_send dropped the event. The new tests register the screenshot processor via AddEventProcessor and trigger events through SentrySdk.CaptureMessage, so the event flows through the real pipeline. A positive control test confirms screenshots are sent when events are captured. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This was referenced May 5, 2026
3 tasks
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.
Relates to #2642 and follows the release of getsentry/sentry-dotnet#5162
Fixes #2641
Screenshot capture will be skipped if the triggering event was not captured as this would lead to an "orphaned" screenshot.
Changelog
6.5.0
Features ✨
Fixes 🐛
SentryEventto haveIsCapturedto allow dropping screenshots of filtered events by JoshuaMoelans in #5162PruneFilteredSpansruns by jamescrosswell in #5186Dependencies ⬆️
Deps
Other
6.4.1
Fixes 🐛
Dependencies ⬆️
Deps
6.4.0
Features ✨
Fixes 🐛
options.Native.ExperimentalOptions.SignalHandlerStrategytoSentry.Android.SignalHandlerStrategy.ChainAtStartDependencies ⬆️
Deps
6.3.2
Dependencies ⬆️