Skip to content

Add NoFlushPanicIntegration for sentry#211

Merged
TheJokr merged 1 commit into
mainfrom
lblocher/sentry-panic-noflush
Jun 1, 2026
Merged

Add NoFlushPanicIntegration for sentry#211
TheJokr merged 1 commit into
mainfrom
lblocher/sentry-panic-noflush

Conversation

@TheJokr
Copy link
Copy Markdown
Collaborator

@TheJokr TheJokr commented May 29, 2026

sentry's built-in panic handler integration explicitly flushes each event it generates. This makes sense as a default: a double-panic aborts the process, which would cause sentry event for the initial panic to be lost. However, it significantly increases the wall-clock duration of the panic handler if flushing means sending an HTTP request to a remote sentry server.

NoFlushPanicIntegration uses sentry-panic's public API to generate the exact same panic events as sentry's built-in handler, but does not flush to speed up panic handler processing. This is preferrable for services where panics are caught and contained, for example in an HTTP server's request handler.

sentry's built-in panic handler integration explicitly flushes each
event it generates. This makes sense as a default: a double-panic aborts
the process, which would cause sentry event for the initial panic to be
lost. However, it significantly increases the wall-clock duration of the
panic handler if flushing means sending an HTTP request to a remote
sentry server.

`NoFlushPanicIntegration` uses `sentry-panic`'s public API to generate
the exact same panic events as sentry's built-in handler, but does not
flush to speed up panic handler processing. This is preferrable for
services where panics are caught and contained, for example in an HTTP
server's request handler.
@TheJokr TheJokr requested a review from fisherdarling May 29, 2026 14:54
@TheJokr TheJokr self-assigned this May 29, 2026
@TheJokr
Copy link
Copy Markdown
Collaborator Author

TheJokr commented May 29, 2026

cc @gregor-cf

@TheJokr TheJokr merged commit d6a7566 into main Jun 1, 2026
20 checks passed
@TheJokr TheJokr deleted the lblocher/sentry-panic-noflush branch June 1, 2026 18:05
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.

2 participants