Skip to content

feat(client-reports): Record logs dropped by the logs buffer limit - #2322

Merged
Litarnus merged 1 commit into
masterfrom
feat/client-reports-logs-buffer-overflow
Nov 6, 2026
Merged

Litarnus merged 1 commit into
masterfrom
feat/client-reports-logs-buffer-overflow

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

When log_flush_threshold is not set, logs are kept in a buffer of 1000. Once it's full, each new log pushes out the oldest one, which is never sent. This records each of those as log_item / buffer_overflow.

The buffer doesn't say when it drops an item, so the change compares the count before and after the push. A full buffer keeps the same count. An unbounded buffer (log_flush_threshold set) always grows, so it never records anything. The test fills the buffer, checks that nothing was recorded yet, then adds one more log.

I used buffer_overflow because the client reports spec defines it for SDK-internal buffers, and the span recorder limit (#2309) already uses it. The Python SDK records its log batcher overflow as queue_overflow instead.

Part of #2228.

via Martin Linzmayer.

--

View Session [Sentry]

Co-Authored-By: Martin Linzmayer <martin.linzmayer@sentry.io>
@Litarnus
Litarnus merged commit 6497cc6 into master Nov 6, 2026
56 checks passed
@Litarnus
Litarnus deleted the feat/client-reports-logs-buffer-overflow branch November 6, 2026 12:24
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.

1 participant