soundcheck-live/react-native. Mobile tracing, profiling and session replay are disabled.
Mobile release builds
SetEXPO_PUBLIC_SENTRY_DSN for the react-native project in each EAS environment used below. Set SENTRY_AUTH_TOKEN as a secret upload credential in those environments. The token needs source-map upload access to that project. Never use an EXPO_PUBLIC_ prefix for the token or put it in Expo extra.
Roll out the sanitizer and privacy callbacks before activating the DSN for shared EAS environments. The upload token can be provisioned first because it does not enable runtime reporting. To validate this branch before rollout, supply the DSN only to a controlled local production-profile build or a dedicated EAS validation environment that builds this exact branch. Do not activate the DSN for concurrent builds from branches that lack the sanitizer.
EAS profiles choose credentials independently of the event environment label.
revyl is a standalone simulator build. It does not provide production acceptance evidence. qa shares production credentials but reports its own environment. Release build workers for preview, revyl, qa and production warn when the DSN or upload token is missing. Set SENTRY_REQUIRE=1 to make missing credentials fail the build after provisioning. Local Expo configuration evaluation remains available without these credentials.
The Expo Sentry plugin uploads native release source maps. Metro composes the Sentry and PostHog asset serialization plugins through Expo’s single serializer so both use the bundle debug ID. PostHog upload configuration remains independent and uses POSTHOG_CLI_TOKEN and POSTHOG_CLI_ENV_ID.
The Sentry SDK supplies the native release identifier, com.soundchecklive.app@<version>+<build>, and distribution from the native build number. Do not replace the release with the Expo version alone. EAS remote versioning and autoIncrement supply each production build’s version code or build number.
Mobile disables default PII and sanitizes error events, breadcrumbs and logs before sending them. The sanitizer removes credentials, private request data and personal or financial fields while retaining opaque user IDs and diagnostic stack data. The upload token exists only in the build environment.
Over-the-air updates
The OTA workflow loads EAS variables withenv:exec, then sets the event label from the channel before exporting the bundle. This keeps QA labeled qa even though it shares production credentials. Profile env values in eas.json do not apply to OTA updates. The workflow publishes that exact export with --skip-bundler --environment production for both supported channels. Keep the DSN readable by the EAS CLI, using plaintext or sensitive visibility.
After publishing the update, the workflow uploads the exported dist source maps with sentry-expo-upload-sourcemaps. Store SENTRY_AUTH_TOKEN separately as a GitHub Actions secret. An EAS variable with Secret visibility is available to remote build workers, not the GitHub-hosted upload command. Until that secret is provisioned, the upload step warns and skips. A configured upload failure fails the workflow.
Production acceptance
- Dispatch the mobile build workflow with the EAS
productionprofile using its production environment. Confirm the native build finishes with successful Sentry source-map and dSYM upload output. - Install that exact artifact on a physical device through TestFlight or the Android internal track. Record the EAS build ID, native version and build number.
- Capture a controlled exception from a temporary validation build or an explicitly authorized test path. Confirm Sentry receives it in
productionwith the expected native release and distribution. - Inspect the event in Sentry. Its application frames must show original TypeScript source, file names and line numbers. Confirm the error, breadcrumb and log payloads contain no seeded credentials, email addresses or financial values.
- Confirm
[TokenCache]warnings arrive in Sentry logs. Sign in as a crew account, go offline, and open an offer. Check the event and logs contain no email, phone, name or note text. - Publish an OTA update to the same channel, confirm its source-map upload succeeds, and repeat the exception, environment, native release, symbolication, TokenCache and offline-offer privacy checks.
- Remove any temporary validation code before the release. Simulator, Expo Go and development-client results do not satisfy this acceptance check.
Architecture
The server configuration below uses its existing Sentry project. Server errors are differentiated by theSENTRY_ENVIRONMENT tag. Mobile uses the separate react-native project described above.
Why single project?
Configuration
Environment variables
Sampling rates
When traffic increases, consider reducing production to 0.1 (10%) for cost savings.
Setup
Step 1: get your Sentry DSN
1
Sign in to Sentry
Go to sentry.io
2
Create or select project
Choose “Go” as the platform
3
Get DSN
Navigate to Settings → Projects → Client Keys (DSN)Format:
https://key@o123456.ingest.sentry.io/project-idStep 2: add DSN to GitHub Secrets
1
Open repository settings
Settings → Secrets and variables → Actions
2
Create secret
- Name:
SENTRY_DSN - Value: Your DSN from Step 1
The same DSN is used across all environments. Errors are differentiated by
SENTRY_ENVIRONMENT.Step 3: deploy via Terraform
When CI/CD runs:- Workflow passes
TF_VAR_sentry_dsnfrom GitHub Secret - Terraform creates
sentry-dsnsecret in Key Vault - App Service receives environment variables
Verification
Test endpoint (dev only)
Check logs
Dashboard usage
Filtering by environment
Use the environment dropdown in Sentry to filter:- Select “production” for prod-only errors
- Select “development” for dev-only issues
Setting up alerts
1
Create Alert Rule
Go to Alerts → Create Alert Rule
2
Set conditions
Example: “When an issue is first seen”
3
Add environment filter
Add filter:
environment:production4
Configure notifications
Set up email, Slack, etc.
Recommended alert rules
Troubleshooting
Sentry Not Receiving Events
Sentry Not Receiving Events
- Verify DSN is set in App Service Configuration
- Check logs for “Sentry initialized” message
- Ensure network allows outbound to
*.ingest.sentry.io
Events Not Tagged with Environment
Events Not Tagged with Environment
- Verify
SENTRY_ENVIRONMENTis set in app_settings - Check API is reading the config correctly
Secret Already Exists Error
Secret Already Exists Error
Soft-delete the secret and re-run pipeline:Vault names by environment:
- Dev:
dev01-cus-core-kv - QA:
qa01-cus-core-kv - Prod:
prod-cus-core-kv
High Volume/Cost Concerns
High Volume/Cost Concerns
Reduce
SENTRY_TRACES_SAMPLE_RATE in production. For errors (not traces), Sentry uses smart sampling automatically.