diff --git a/docs/platforms/react-native/manual-setup/app-start-error-capture.mdx b/docs/platforms/react-native/manual-setup/app-start-error-capture.mdx index 5d134de7f5fb71..06b94749e20a65 100644 --- a/docs/platforms/react-native/manual-setup/app-start-error-capture.mdx +++ b/docs/platforms/react-native/manual-setup/app-start-error-capture.mdx @@ -40,6 +40,16 @@ Options from `sentry.options.json` are merged with options from `Sentry.init()` +### Setting the Environment + +If you need different `environment` values for build (e.g., production vs staging), set the `SENTRY_ENVIRONMENT` environment variable at build time. The SDK build scripts will use this to override the `environment` in your `sentry.options.json` without modifying the source file. + +```bash +SENTRY_ENVIRONMENT=staging npx react-native run-android +``` + +This works in any CI/CD system by setting the environment variable in your build configuration. + ## Android Setup Initialize Sentry in your `MainApplication` class: