Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #186 +/- ##
==========================================
- Coverage 96.48% 96.47% -0.01%
==========================================
Files 97 97
Lines 3553 3543 -10
==========================================
- Hits 3428 3418 -10
Misses 125 125 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…uilt-in record copy structlog >=24.1 makes a shallow copy of the LogRecord in ProcessorFormatter.format(), so the original msg, args, and exc_info are preserved for Sentry's LoggingIntegration hook. No need to snapshot/restore them ourselves. - Inline formatter construction into setup_structlog() - Use pass_foreign_args=True for gunicorn access processor - Add format_exc_info to foreign_pre_chain for stdlib logs - Strip positional_args in map_event_to_json_record - Assert exact tracebacks and Sentry events in tests
No production consumer — all JSON formatting goes through map_event_to_json_record via structlog's ProcessorFormatter. JsonRecord TypedDict stays as the schema definition.
f9e1fd2 to
43f11ca
Compare
emyller
approved these changes
Mar 30, 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.
In this PR, we:
JsonFormatterwhich is no longer used._SentryFriendlyProcessorFormattersince it's deemed redundant — Sentry is able to handle event deduplication whenstructlog.stdlib.ProcessorFormatteris used (as proven by new tests).