Sentry error tracking for React Native in production: the release checklist
Sentry error tracking for React Native is useful in production only when an event leads to a fixable release, not merely a large stream of stack traces. Install the SDK early, upload source maps and native symbols for the exact build, attach safe context, test a real release artifact, and define which alerts require action.
Sentry’s React Native documentation describes automatic error and exception reporting plus optional logs, tracing, session replay, profiling, metrics, and user feedback. The production decision is not to enable every feature. It is to choose the smallest set that answers your incident questions while respecting privacy, performance, and mobile release constraints.
Start with the release boundary
Record the app version, build number, commit, environment, and Sentry release identifier together. An event without a trustworthy release is harder to connect to the binary a user actually runs.
Release record
appVersion: 2.4.0
buildNumber: 118
commit: <immutable commit>
environment: production
sentryRelease: mobile-app@2.4.0+118
Checks:
- source maps uploaded for this build
- native symbols uploaded for this build
- test event received from the release artifact
- privacy review completedUse the same release identity in the build and in the uploaded artifacts. If a crash appears after an update, you should be able to answer which source revision produced it and whether the symbol files match that exact revision.
Do not treat a development simulator run as release verification. Install the artifact you plan to distribute on a physical device, trigger a controlled test error, and confirm that the event resolves to readable application frames.
Install early, configure deliberately
Sentry’s React Native guide documents installation through the Sentry wizard and notes that the wizard can add the SDK, bundler configuration, Expo configuration, native build steps, and symbol-upload steps. It can patch a project once, after which the changed files should be reviewed and committed.
The wizard is not a security review. Inspect every generated change:
- Which build phases were added?
- Where are organization and project identifiers stored?
- Which files contain upload credentials or tokens?
- Which environments upload artifacts?
- Does a local build attempt to upload anything unexpectedly?
- Does the configuration work for both development and release builds?
If you use Expo, follow Sentry’s current Expo guide and verify the generated native projects or build configuration produced by your workflow. Keep the integration in version control and make the release build reproducible.
Initialize the SDK as early as your application architecture allows, but do not hide initialization failures. A production app should still start if telemetry is temporarily unavailable. Monitoring must not become a required dependency for rendering the first screen.
One codebase. iOS, Android, and web.
The Fitness Kit ships with auth, a database, and a backend already connected — no setup. Live demo at fitness-preview.otf-kit.dev.
Upload artifacts for readable stack traces
JavaScript source maps and native debug symbols are what turn a minified or native crash into code your team can inspect. Upload them as part of the release build pipeline, not as a manual step after an incident.
Verify three identities:
- The event’s release matches the uploaded artifact release.
- The artifact’s distribution and platform match the event.
- The source revision used to build the app matches the source used to generate symbols.
Create a release test that fails loudly when an artifact is missing. A pipeline that reports “build passed” while silently skipping source-map upload creates false confidence.
Keep upload credentials out of the application bundle and logs. They belong in the build environment or protected CI configuration. A client DSN may be designed for public use, but that does not make every Sentry credential safe to ship to a device.
Attach context that helps a fix
A useful event explains what the user was doing, which screen was open, which release was installed, and which safe operation failed. Avoid sending raw customer content, access tokens, authentication headers, full prompts, or sensitive form values.
Prefer bounded context:
import * as Sentry from "@sentry/react-native"
export function reportCheckoutFailure(input: {
orderId: string
step: "address" | "payment" | "confirmation"
retryable: boolean
}) {
Sentry.withScope((scope) => {
scope.setTag("checkout_step", input.step)
scope.setTag("retryable", String(input.retryable))
scope.setContext("checkout", {
orderId: input.orderId,
step: input.step,
})
Sentry.captureException(new Error("Checkout request failed"))
})
}The example deliberately avoids attaching a card number, full address, response body, or authentication token. The order identifier should itself be considered sensitive if it can reveal customer activity; use an internal event identifier or a redacted value when appropriate.
Use tags for low-cardinality fields that support grouping and filtering. Use context for structured debugging details. Do not put an unbounded user-generated string into a tag and accidentally create thousands of distinct groups.
Decide whether to identify users
User identity can make account-specific failures easier to reproduce, but it increases privacy responsibility. Decide whether Sentry needs a stable internal identifier, and document what is sent, who can access it, how long it is retained, and how deletion requests are handled.
Sentry’s setup documentation calls out options that can send additional data, including personally identifiable information. Review those options rather than copying a sample configuration unchanged. The default that is acceptable for a demo may be wrong for a production app.
Before enabling extra context, answer:
- What is the minimum data needed to triage this error?
- Is the value stable enough to group incidents?
- Could the value contain private user content?
- Is it covered by the privacy notice and data inventory?
- Can support remove or export it if required?
- Are logs, replay, profiling, and feedback subject to separate review?
Add a redaction or filtering layer where the SDK supports it. Test the filter with representative data and verify that the event still contains enough information to act.
Build release health around user impact
An error count is not the same as an incident. Group by release, platform, device family, operating system, and affected flow. Prioritize crashes that block launch, sign-in, purchase, primary creation, or data access.
Define alert rules with an owner and next action:
| Signal | First question | Action |
|---|---|---|
| Crash-free sessions fall after a release | Which build and platform changed? | Halt rollout or prepare a rollback |
| One error spikes on one OS | Is it a native or device-specific regression? | Reproduce on the affected matrix |
| Auth errors increase | Is the session or backend boundary failing? | Check token refresh and server logs |
| One user reports a failure | Can safe context reproduce the same flow? | Link the event to the support case |
| A model request fails | Is the provider, input, or timeout responsible? | Show a safe retry or fallback state |
Do not alert on every handled exception. A handled error can be expected input rejection, a temporary network failure, or a product bug. Give each category a severity and a route to the person who can fix it.
Use breadcrumbs or structured context to show the sequence before the failure: app start, navigation, submit, network request, response classification, and retry. Keep the values bounded and redact content that is not needed for diagnosis.
Test error reporting before release
A production monitoring integration is unfinished until you can test it from the release artifact. Add a controlled test path that is inaccessible to normal users or enabled only in a release-candidate environment.
Test these cases:
- JavaScript exception resolves to source lines.
- Native crash or symbol test resolves to a readable frame.
- Network failure contains the operation and retry state.
- Authentication failure does not include a token.
- User context is redacted as designed.
- Duplicate events group as expected.
- Offline events do not block app startup.
- The release and environment labels are correct.
- A test event can be deleted or clearly marked after verification.Test cold start, background-to-foreground, force-quit, offline mode, low memory, and a slow connection. Mobile failures often occur outside the path you run while the debugger is attached.
Sentry’s React Native troubleshooting documentation calls out platform-specific issues, including Android 16 KB page-size support and privacy-manifest concerns. Treat SDK upgrades as native release changes: read the current troubleshooting notes, rebuild, and test on the affected platform rather than assuming a JavaScript-only update is enough.
Keep privacy and build settings aligned
Do not enable session replay, logs, profiling, or extra personally identifiable information simply because the SDK exposes the option. Each feature changes what is collected and how the team should review it.
Create a small telemetry inventory:
Event: checkout failure
Collected: release, platform, screen, step, internal event ID
Not collected: payment details, auth headers, raw response, full address
Retention: documented in the monitoring policy
Access: mobile and backend maintainers
Deletion path: support and privacy workflowCompare that inventory with the actual event payload in a production-like project. Review third-party integrations and downstream exports. If a logging feature forwards event data somewhere else, include that destination in the review.
Give an AI coding agent a bounded monitoring task
An AI coding agent can add an SDK import in seconds, but monitoring changes affect privacy, build phases, native artifacts, and incident response. Provide the agent with the release target, allowed files, data restrictions, and evidence requirements.
Add error reporting to the checkout failure boundary.
- Read the existing release and privacy instructions first.
- Reuse the current telemetry wrapper if one exists.
- Attach only release, platform, checkout step, and retryable state.
- Never send tokens, payment data, raw prompts, or response bodies.
- Add a test that verifies the event shape without sending real data.
- Do not change native build phases without listing the impact.
- Report source-map and symbol-upload checks separately.Review the complete diff, generated native files, and build output. Ask the agent to list every field sent to the monitoring provider. Require a human decision for user identity, replay, logs, and retention.
For release checks around an AI-built app, read app store submission checklist for an AI-built app. For repository boundaries that help an agent make a small monitoring change, read production repository conventions for AI coding agents.
Connect monitoring to the product foundation
OTF’s templates page verifies a free MIT component SDK and a free AI configurations pack for Cursor, Claude, and Lovable. That is the relevant OTF connection here: a reusable component and project-context starting point can make an instrumentation surface easier to locate, but it does not configure Sentry, define your privacy policy, or prove your native release artifacts.
A production Sentry setup is ready when a real release can report a controlled failure with readable frames, useful and safe context, correct release identity, tested artifact uploads, and an owner who knows what happens next. Start narrow, measure user impact, redact aggressively, and expand telemetry only when it answers a question your team actually needs to solve.
Sources
- Sentry React Native documentation
- Sentry React Native Expo guide
- Sentry React Native troubleshooting
- OTF templates
Stop wiring. Start shipping.
- Login, database, and backend already connected — nothing to set up
- iOS + Android + web from one codebase
- AI configs pre-tuned + 40+ tested prompts included