Repository navigation
fix(transport): Record and warn about items dropped for size - #3210
Open
sentry-junior[bot] wants to merge 2 commits into
Open
sentry-junior[bot] wants to merge 2 commits into
sentry-junior[bot] wants to merge 2 commits into
Conversation
Envelope items that are still oversized after size reduction were skipped with only a debug log, so the drop was invisible at the default log level and never reached client reports. Log the drop at warn level and record a send_error lost event, like the HTTP 413 path. Fixes #3209
solnic
reviewed
Nov 17, 2026
solnic
left a comment
Collaborator
There was a problem hiding this comment.
Overall looks good to me, left just one comment with the warning logs potentially causing log flooding in some cases.
Later drops of the same item type are logged at debug level so apps that keep producing oversized items don't flood their logs. Every drop is still recorded as a lost event.
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.
Fixes #3209
Repro: getsentry/repro#94
When an envelope item is still larger than its size limit after
Envelope::Item#serializedrops breadcrumbs and trims stack frames,Transport#serialize_envelopeskipped it with only alog_debugline. At the default log level the drop left no trace, and because no lost event was recorded, it never reached client reports or the org's stats.The drop is now logged at
warnlevel, with the same size breakdown as before, and recorded as asend_errorlost event with the item's data category, count, and byte size. That matches the HTTP 413 path, which the client reports spec also maps tosend_error.via automation
evt_986cce2def3acf1f0c69ed3fe2462a31· Run IDdispatch_9b827fa307e6a71628eb94a1ad69880a.--
View Session [Sentry]