Skip to content

🐛 fix crash source_type mapping#127

Merged
bcaudan merged 1 commit into
mainfrom
bcaudan/fix-crash-source-type
May 27, 2026
Merged

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

Conversation

@bcaudan

@bcaudan bcaudan commented May 21, 2026

Copy link
Copy Markdown
Collaborator

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

@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.

Looks good

@bcaudan bcaudan merged commit 823f8af into main May 27, 2026
15 checks passed
@bcaudan bcaudan deleted the bcaudan/fix-crash-source-type branch May 27, 2026 12:15
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