Skip to content

fix(dedupe): Mark active session as crashed when deduplicating unhandled exceptions - #8109

Open
ryder777777 wants to merge 1 commit into
getsentry:masterfrom
ryder777777:fix/dedupe-unhandled-session-crash-8096
Open

ryder777777 wants to merge 1 commit into
getsentry:masterfrom
ryder777777:fix/dedupe-unhandled-session-crash-8096

Conversation

@ryder777777

Copy link
Copy Markdown

Description

When an exception is logged (logging.exception(...)) or captured as handled (capture_exception(...)) and then re-raised to crash the request/application (handled=False), the first capture updates the active session to errored (errors=1, status="ok") and records the exception in DedupeIntegration._last_seen.

When the re-raised unhandled exception subsequently reaches the framework or excepthook crash handler (mechanism={"handled": False}), DedupeIntegration drops the duplicate event before Client.capture_event calls _update_session_from_event, leaving the session in errored status instead of crashed.

This updates DedupeIntegration so that when it drops a duplicate event whose exception mechanism has handled=False, it transitions any active session on the isolation/current scope to status="crashed".

Issues

@ryder777777
ryder777777 requested a review from a team as a code owner October 22, 2026 13:30

This branch has not been deployed

No deployments
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.

Logging an exception before re-raising it turns a crash into a handled error

1 participant