DEV Community

Cover image for Moving Crash Reporting Infrastructure Without Losing Visibility
Amit chakraborty
Amit chakraborty

Posted on Originally published at amitchakraborty.dev

Moving Crash Reporting Infrastructure Without Losing Visibility

Say you are a lead engineer responsible for a React Native 0.76 application with a global user base. Your team is migrating from an older, on-premise crash reporting instance to a modern, cloud-based observability platform. You have updated the SDK, changed the DSN, and pushed the release to 10% of your users.

An hour later, the new dashboard lights up with a 5% crash rate. You click into the issue, but instead of seeing file names and line numbers, you see a wall of hex addresses: 0x000000010467c934 and [hidden]. You check the old dashboard; it is empty for this version. You check the new dashboard; it says "Missing Debug Symbols".

Because you flipped the switch globally in your CI/CD pipeline, the build artifacts (dSYMs and ProGuard maps) for this version only went to the new server, but the SDK configuration in the app was cached or mismatched for some users. You cannot debug the spike. You have to roll back the release, losing a full day of deployment progress and leaving a critical regression active in the wild while you wait for the App Store to process the reversal.

Why symbolication breaks during migration

Symbolication is the process of mapping machine-readable memory addresses back to human-readable source code. It is not performed on the device; it is a post-processing step performed by the server.

In a React Native environment, this happens at three distinct layers:

  1. Native iOS: Translating addresses in the Mach-O binary using dSYM (Debug Symbol) files.
  2. Native Android: De-obfuscating Java/Kotlin code using mapping.txt files generated by R8 or ProGuard.
  3. JavaScript: Mapping the minified index.bundle back to TypeScript source code using Source Maps.

The migration failure usually occurs because of a "split-brain" state. The build system (CI) and the client (the app) must be perfectly synchronised. If the CI uploads symbols to Destination A, but the app sends the crash report to Destination B, Destination B cannot symbolicate the report.

Most documentation assumes a "greenfield" setup where you only have one destination. In production, you have multiple versions of your app active simultaneously. A hard cutover in the CI pipeline guarantees that any version currently in the "Review" or "Staged Rollout" phase will become un-debuggable the moment the pipeline changes.

The migration fix: A step-by-step parallel path

To migrate without a freeze window, you must implement a "Double-Write" strategy for artifacts before you switch the client-side SDK.

1. Identify the Build UUIDs

Every build produces a unique identifier (the Debug ID). For iOS, this is embedded in the Mach-O header; for Android, it is often a generated property in the AndroidManifest.xml or a sentry-debug-meta.properties file.

Confirm your current IDs by running:

# For iOS: Check the UUID of the local build artifact
dwarfdump --u YourApp.app/YourApp

# For Android: Check the mapping file
head -n 20 android/app/build/outputs/mapping/release/mapping.txt
Enter fullscreen mode Exit fullscreen mode

If the new platform cannot find a match for these exact IDs, symbolication will fail.

2. Configure Dual-Artifact Uploads in CI

Do not remove the old upload logic. Modify your CI configuration (GitHub Actions, Bitrise, or CircleCI) to upload the same artifacts to both the old and new providers.

If you are using fastlane, your Fastfile should look like this:

lane :upload_symbols do
  # Old Provider
  upload_to_legacy_platform(
    api_key: "OLD_KEY",
    dsym_path: "./YourApp.dSYM.zip"
  )

  # New Provider (e.g., Sentry)
  sentry_upload_dif(
    auth_token: ENV["SENTRY_AUTH_TOKEN"],
    org_slug: "my-org",
    project_slug: "my-project",
    path: "./YourApp.dSYM.zip"
  )
end
Enter fullscreen mode Exit fullscreen mode

How to confirm it worked: Log into both dashboards. Search for the Build ID or Version Number. Both should show "Symbols Received" or "Artifacts Uploaded" for the same version string.

3. Create a Crash Reporting Wrapper

Do not call the SDK directly in your application code. Create a CrashReporter abstraction. This allows you to toggle the destination or even send to both during the transition period.

// src/utils/CrashReporter.ts
import * as LegacySDK from 'legacy-library-react-native';
import * as NewSDK from '@new-provider/react-native';

export const CrashReporter = {
  init: () => {
    LegacySDK.init({ dsn: '...' });
    NewSDK.init({ dsn: '...' }); // Dual-init for the transition period
  },
  logError: (error: Error, context: any) => {
    LegacySDK.captureException(error, { extra: context });
    NewSDK.captureException(error, { extra: context });
  },
  setUser: (id: string) => {
    LegacySDK.setUser(id);
    NewSDK.setUser(id);
  }
};
Enter fullscreen mode Exit fullscreen mode

Note: Dual-initialisation has a performance cost. Initialising two native crash handlers can increase app launch time by 100ms to 300ms depending on the device. Accept this cost for exactly one release cycle.

4. Verify Symbolication with a "Stunt" Crash

Before shipping to users, trigger a deliberate crash in a physical device build.

// Temporary button in a hidden debug menu
<Button 
  title="Trigger Test Crash" 
  onPress={() => { throw new Error("Migration Verification Crash"); }} 
/>
Enter fullscreen mode Exit fullscreen mode

The Verification Checklist:

  1. Does the crash appear in the new dashboard?
  2. Does it show the TypeScript filename (e.g., HomeScreen.tsx) instead of index.bundle?
  3. Does it show the native stack trace (e.g., AppDelegate.m) instead of hex addresses?
  4. Are the tags (device model, OS version) populated?

If any of these are missing, your source maps are likely misaligned with the bundle generated during the build.

5. The Phased Cutover

Once you have verified that the new platform is receiving symbolicated crashes, remove the legacy SDK from the code in the next sprint. However, keep the CI upload to the legacy platform for at least 30 days.

Users on older versions of your app will still be sending crashes to the old platform. If you stop uploading symbols for those versions, any late-breaking bugs in the "old" version will become invisible.

The cost of the transition

Migration is not free. You will face three primary costs:

  1. Binary Size: Including two SDKs will increase your IPA/APK size. For React Native, adding a second crash SDK typically adds 0.5MB to 1.2MB to the compressed download size.
  2. Build Time: Uploading source maps and dSYMs twice adds time to your CI pipeline. On a standard GitHub Actions runner, uploading a 500MB dSYM set twice can add 2–4 minutes to the build.
  3. The "Ghost" Problem: If you dual-report crashes, your "Total Crash" metrics will double. Ensure your product managers know that the "Increase in crashes" is a reporting artefact, not a quality regression.

When not to do this: If you are below 1,000 Monthly Active Users (MAU), the complexity of dual-reporting is rarely worth it. In that case, a hard cutover with a 24-hour "blind spot" is a pragmatic trade-off.

At your level

Starting out

Focus on the difference between a JavaScript error and a Native crash. A JavaScript error is caught by the React Native bridge; a native crash (like an out-of-memory or a null-pointer in a native module) kills the process. Learn to use addr2line on Linux or atos on macOS to manually symbolicate a single address; it demystifies what the server is doing for you.

Working engineer

Own the CI/CD integration. The most common failure point is not the code, but the environment variables in your build runner. Ensure your SENTRY_PROPERTIES or equivalent files are correctly generated for every build flavour (staging, production, etc.). If you use ProGuard, ensure you are archiving the mapping.txt as a build artifact so you can manually upload it if the automated step fails.

Senior or staff

Focus on data privacy and cost. Migrating crash reporters often means moving PII (Personally Identifiable Information). Ensure your beforeSend hooks are consistent across both SDKs to scrub emails or auth tokens from stack traces. Architect the wrapper so that the legacy SDK can be remotely disabled via a feature flag if it causes stability issues, without requiring a new store submission.

Lead or director

Evaluate the vendor lock-in. The cost of migration is high because of the artifact pipeline. When choosing a new provider, ask how they handle "historical symbolication"—can you upload symbols for a build that happened six months ago? Budget for the increased CI costs and the temporary dip in "crash-free users" metrics during the dual-reporting phase.

In the interview

The Question: "We are seeing unsymbolicated crashes in production after our last update. How do you investigate this?"

The Weak Answer: "I would check if the SDK is initialised correctly and make sure I followed the documentation for uploading source maps."

Why it’s weak: It assumes the problem is a simple configuration error. It doesn't account for the complexity of the build pipeline or the mismatch between the binary and the symbols.

The Strong Answer: "I would first identify the 'Debug ID' of the crashing build from the raw crash report and compare it to the IDs of the symbol files present on our server. If they don't match, the symbolication will fail regardless of the SDK config. I'd check the CI logs for that specific build version to see if the upload step succeeded or if it was skipped due to a network failure or a missing API key. If the IDs match but symbolication still fails, I'd look at whether we are using a custom transformer in React Native that might be shifting line numbers in the source map."

The Senior/Staff Follow-up: "How do you handle symbolication for a React Native app that uses multiple bundles or dynamic modules?"

The reasoning: This probes your understanding of how source maps are indexed. A senior engineer knows that each bundle needs its own source map and that the sourceMappingURL at the bottom of the bundle must be reachable or correctly associated by the CLI tool during the upload phase. They will mention


Amit Chakraborty is a founding engineer and senior architect — React Native, AI/RAG systems and production architecture. Portfolio: www.amitchakraborty.dev · LinkedIn · GitHub. Open to senior and founding engineering roles, remote worldwide.

Top comments (0)