Skip to content

🐛 fix crash source_type mapping#127

Open
bcaudan wants to merge 1 commit into
mainfrom
bcaudan/fix-crash-source-type
Open

🐛 fix crash source_type mapping#127
bcaudan wants to merge 1 commit into
mainfrom
bcaudan/fix-crash-source-type

Conversation

@bcaudan
Copy link
Copy Markdown
Collaborator

@bcaudan bcaudan commented May 21, 2026

Motivation

The source_type field on crash error events was incorrectly set on macOS. The WASM minidump processor (rust-minidump) returns "mac" for macOS, but the RUM schema expects "macos".
The code was casting the raw OS string directly without any mapping, causing macOS crashes to be tagged with an invalid source_type.

Changes

  • Add an explicit OS_TO_SOURCE_TYPE lookup table mapping minidump OS strings (mac, linux, windows) to the correct RUM source_type values (macos, linux, windows)
  • Report a telemetry error when an unexpected OS value is encountered, while still passing it through to avoid silent data loss
  • Fix the existing test that was asserting the wrong value ('mac' instead of 'macos'), and add coverage for linux, windows, and unknown OS values

Test instructions

A crash on mac should be reported with macos source type

Checklist

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

- map minidump 'mac' → 'macos' (the processor returns 'mac', RUM expects 'macos')
- explicitly map 'linux' and 'windows' (identity, but documented)
- report a telemetry error for any unexpected OS value
@bcaudan bcaudan marked this pull request as ready for review May 21, 2026 12:07
@bcaudan bcaudan requested a review from a team as a code owner May 21, 2026 12:07
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.

1 participant