Skip to content

on_crash receives an event without scope data #2102

Description

@jpnurmi

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugsomething isn't working as it shouldErrorsissues relates to the error reporting productNativeplatform label

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions