Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@ Options from `sentry.options.json` are merged with options from `Sentry.init()`

</Alert>

### 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:
Expand Down
Loading