Skip to content

✨ [RUM-14260] add native crash reporting#37

Merged
bcaudan merged 14 commits into
mainfrom
bcaudan/crash
Mar 25, 2026
Merged

✨ [RUM-14260] add native crash reporting#37
bcaudan merged 14 commits into
mainfrom
bcaudan/crash

Conversation

@bcaudan

@bcaudan bcaudan commented Mar 11, 2026

Copy link
Copy Markdown
Collaborator

Motivation

Enable native crash reporting in the electron-sdk by processing minidump files from Electron's crashReporter and emitting RUM error events with full thread/stack/module information.

Changes

  • Add minidump-processor/ WASM crate (Rust, using upstream rust-minidump pinned to pre-regression commit) with TypeScript wrapper at src/wasm/
  • Add CrashCollection in src/domain/rum/error/ — scans crash dumps on startup, processes minidumps, transforms to RUM error events with is_crash: true, thread info, binary images, and stack traces
  • Crash attribution via startTime from dump file birthtime (Assembly hooks handle session/view context)
  • Update rum-events-format submodule and regenerate event types
  • Move ErrorCollection into error/ subdirectory alongside CrashCollection
  • Add E2E test for crash reporting
  • Add crash button to playground (with Electron version pinned for symbol availability)

Test instructions

  • Playground: click "Crash" button to trigger a native crash and verify RUM event

Checklist

  • Tested locally (playground)
  • Added unit tests for this change.
  • Added e2e/integration tests for this change.
  • Updated related documentation.

@bcaudan bcaudan marked this pull request as ready for review March 11, 2026 15:14
@bcaudan bcaudan requested a review from cdn34dd as a code owner March 11, 2026 15:14
@bcaudan bcaudan marked this pull request as draft March 11, 2026 15:14

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8269e76c1a

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/domain/rum/error/CrashCollection.ts
Comment thread src/domain/rum/error/CrashCollection.ts
Comment thread src/domain/rum/error/CrashCollection.ts Outdated
@bcaudan bcaudan force-pushed the bcaudan/crash branch 4 times, most recently from fdad02c to a940a93 Compare March 12, 2026 09:24
@bcaudan bcaudan marked this pull request as ready for review March 12, 2026 09:28

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a940a932d1

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/domain/rum/error/CrashCollection.ts Outdated
Comment thread src/domain/rum/error/CrashCollection.ts
Comment thread src/domain/rum/error/CrashCollection.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: be5c265f30

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread src/domain/rum/error/CrashCollection.ts
Base automatically changed from bcaudan/session-view-start to main March 23, 2026 10:31
@bcaudan bcaudan requested a review from a team as a code owner March 23, 2026 10:31
bcaudan added 8 commits March 23, 2026 11:34
- Add WASM bindings on top of rust-minidump
- Expose a processMinidump function
- Inline the binary as base64 to avoid distributing it
- add RawRumError crash properties
- move ErrorCollection to rum/error
- using electron crashReporter
- .dmp file scanning and sequential processing at app startup
- create a RUM error for each .dmp file
- add crash IPC handler to E2E app
- extract launchAppManually helper from fixtures
- add crash() method to AppPage
- add crash.scenario.ts with two-phase crash-restart-verify test
- be sure to use crash time as error event date
- be sure to monitor crash processing error, to understand how it goes on the wild
- add a note about performance analysis
Comment thread minidump-processor/README.md
Comment thread scripts/build-minidump-processor.ts Outdated
Comment thread src/domain/rum/error/CrashCollection.ts Outdated
Comment thread src/domain/rum/error/CrashCollection.ts Outdated
Comment thread scripts/build-minidump-processor.ts Outdated
Comment thread src/mocks.specUtil.ts Outdated
bcaudan added 4 commits March 23, 2026 17:00
It should be safer for a first step
- avoid regex search/replace on generated code
- Wasm module initialized only when reports need to be processed
Comment thread src/domain/rum/error/CrashCollection.ts

@cdn34dd cdn34dd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment thread src/domain/rum/error/CrashCollection.ts
@bcaudan bcaudan merged commit c8d04c0 into main Mar 25, 2026
11 checks passed
@bcaudan bcaudan deleted the bcaudan/crash branch March 25, 2026 08:45
@bcaudan bcaudan mentioned this pull request Mar 26, 2026
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