Skip to content

Add NoFlushPanicIntegration for sentry#211

Open
TheJokr wants to merge 1 commit into
mainfrom
lblocher/sentry-panic-noflush
Open

Add NoFlushPanicIntegration for sentry#211
TheJokr wants to merge 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

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