Skip to content

on_crash receives an event without 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 crash metadata, 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

  1. linear-code commented on Sep 17, 2026

    @linear-code
  2. added
    Bugsomething isn't working as it should
    Errorsissues relates to the error reporting product
    Nativeplatform label
    on Sep 17, 2026
  3. added a parent issue on Sep 21, 2026
  4. removed a parent issue on Oct 1, 2026
  5. changed the title [-]`on_crash` receives an event without scope data[/-] [+]`on_crash` receives an event without data[/+] on Oct 7, 2026
  6. jpnurmi commented on Oct 22, 2026

    @jpnurmi
    CollaboratorAuthor

    Crash metadata and modules provided by #2174 and #2184 (merged into v1)

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