Skip to content

Preserve stored structlog exceptions in Sentry events - #414

Merged
lesnik512 merged 1 commit into
mainfrom
fix/390-stored-exception
Nov 3, 2026
Merged

lesnik512 merged 1 commit into
mainfrom
fix/390-stored-exception

Conversation

@lesnik512

Copy link
Copy Markdown
Member

Fixes #390.

Pass the original exc_info to stdlib logging alongside the rendered JSON line. This lets Sentry capture the stored exception and its stack trace outside an except block while keeping the traceback on stdout.

The regression checks the captured Sentry envelope and the JSON line on stdout. It failed before the fix because the envelope had no exception.

Validation passed with just lint-ci and just test-ci (617 tests, 100% coverage).

@lesnik512
lesnik512 merged commit 6318ba5 into main Nov 3, 2026
35 checks passed
@lesnik512
lesnik512 deleted the fix/390-stored-exception branch November 3, 2026 05:16
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.

Keep a stored exc_info on the Sentry event for structlog calls

1 participant