SDKsError tracking
Sentry is your crash + error inbox.
This boilerplate includes a lightweight Sentry setup that:
- Initializes Sentry only when a DSN is present
- Wraps the app root so unhandled errors get captured
- Adds useful Expo Updates tags (update id, embedded vs OTA)
1) Runtime setup (DSN)
Add to .env (or EAS secrets): EXPO_PUBLIC_SENTRY_DSN
If missing, Sentry is disabled and the app exports the unwrapped root component.
2) Build-time setup (sourcemaps + releases)
Conditionally enabled in app.config.ts if all are set: SENTRY_AUTH_TOKEN, SENTRY_ORG, SENTRY_PROJECT
Without proper sourcemaps, Sentry issues may show minified stack traces in production.
3) Automatic capture
When enabled, Sentry captures:
- Unhandled JS exceptions
- Fatal crashes (native + JS, depending on platform/runtime)
Because the app root is exported as Sentry.wrap(Root), navigation + lifecycle context can be attached.
4) Manual error capture
ts
Add tags/extra data:
ts
5) Testing
If Sentry is configured: Profile tab → Dev Tools → Test Sentry (intentionally throws new Error('Hello Sentry'))
