Skip to content

feat(sentry): symbolicate backend errors in debug builds without uploading sourcemaps#188

Merged
gmaclennan merged 1 commit into
mainfrom
feat/debug-backend-sourcemaps
Jun 30, 2026
Merged

feat(sentry): symbolicate backend errors in debug builds without uploading sourcemaps#188
gmaclennan merged 1 commit into
mainfrom
feat/debug-backend-sourcemaps

Conversation

@gmaclennan

Copy link
Copy Markdown
Member

Debug builds of a consuming app now symbolicate embedded-Node-backend errors in Sentry without uploading sourcemaps. The backend's .map ships alongside the bundle and the native side passes Node's --enable-source-maps (under BuildConfig.DEBUG / #if DEBUG), so stacks are remapped to original positions in-process — devs no longer need a Sentry auth token or a per-build upload to read backend stack traces.

Release builds are unchanged: maps stay out of the app and the consumer uploads them with comapeo-rn-upload-sourcemaps (debug-ID matched, symbolicated server-side).

Delivery uses each platform's native config split, so there's no custom build phase. Android colocates the debug map in the src/debug asset tree (debug variants only). iOS adds a Debug-only ComapeoCoreSourcemaps companion pod via :configurations => ['Debug']; its maps merge next to the bundle in the .app (the CocoaPods resource copy runs without --delete), and apple.podspecPath is pinned so the companion is never autolinked into release.

Verified end-to-end on apps/integration: a clean iOS prebuild plus a Debug xcodebuild produces an .app whose nodejs-project/ contains both the bundle and the merged maps, while the generated resources script installs the maps in the Debug configuration block only.

…ading sourcemaps

Debug builds now ship the embedded Node backend's sourcemap alongside the
bundle and pass Node's `--enable-source-maps`, so backend errors are remapped
to original positions in-process and reach Sentry symbolicated — no sourcemap
upload or Sentry auth token needed. Release builds are unchanged: maps stay out
of the app and are uploaded by the consumer via `comapeo-rn-upload-sourcemaps`.

Android ships the debug map colocated in the `src/debug` asset tree (debug
variants only). iOS uses a Debug-only `ComapeoCoreSourcemaps` companion pod
(`:configurations => ['Debug']`) whose maps merge next to the bundle in the
app; `expo-module.config.json` pins `apple.podspecPath` so it is never
autolinked. The native side passes `--enable-source-maps` under
`BuildConfig.DEBUG` / `#if DEBUG`.
@github-actions github-actions Bot added the feature New feature (changelog) label Jun 30, 2026
@gmaclennan
gmaclennan enabled auto-merge June 30, 2026 11:37
@gmaclennan
gmaclennan added this pull request to the merge queue Jun 30, 2026
Merged via the queue into main with commit da2bdb2 Jun 30, 2026
21 checks passed
@gmaclennan
gmaclennan deleted the feat/debug-backend-sourcemaps branch June 30, 2026 11:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature (changelog)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant