All backends invoke on_crash before applying the current scope. In pseudo:
if (on_crash)
on_crash(event);
apply_scope(event);
if (before_send && !on_crash)
before_send(event);
Unlike before_send, the on_crash callback therefore cannot inspect contexts, tags, user, release, environment, or any other scope data for filtering purposes.
With minidump backends, the event contains only event_id, timestamp, platform, and level:
{"event_id":"bcb1c3eb-6bf6-497d-1880-e942cafe61e8","timestamp":"2026-09-17T07:10:47.960701Z","platform":"native","level":"fatal"}
Since on_crash replaces before_send for crashes, it should probably receive the same scope-enriched event, consistent with the normal before_send contract.
All backends invoke
on_crashbefore applying the current scope. In pseudo:Unlike
before_send, theon_crashcallback therefore cannot inspectcontexts,tags,user,release,environment, or any other scope data for filtering purposes.With minidump backends, the event contains only
event_id,timestamp,platform, andlevel:{"event_id":"bcb1c3eb-6bf6-497d-1880-e942cafe61e8","timestamp":"2026-09-17T07:10:47.960701Z","platform":"native","level":"fatal"}Since
on_crashreplacesbefore_sendfor crashes, it should probably receive the same scope-enriched event, consistent with the normalbefore_sendcontract.