Optional Release and Distribution

Learn about how to set optional source maps attributes with older React Native SDKs.

To correctly attribute events sent to Sentry to a release, both the release and dist values will need to be set. You can set these values in the call to init, as discussed in our Releases & Health documentation.

Copied
Sentry.init({
  dsn: "https://examplePublicKey@o0.ingest.sentry.io/0",
  release: "my-project-name@2.3.12",
  dist: "52",
});

The automatic source maps upload script doesn't detect custom values for releases. This means that if you use a custom value for your release, other than the version included with the built-in Xcode or Android Studio, the automatic source maps upload script won't work. Instead, you can set the SENTRY_RELEASE and SENTRY_DIST environment variables, which the automatic source maps upload script will use. This will ensure that the given custom release and dist values are used.

Copied
export SENTRY_RELEASE="my-project-name@2.3.12"
export SENTRY_DIST="52"
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").