---
title: "Optional Release and Distribution"
description: "Learn about how to set optional source maps attributes with older React Native SDKs."
url: https://docs.sentry.io/platforms/react-native/sourcemaps/troubleshooting/optional-release-and-distribution/
---

# Optional Release and Distribution | Sentry for React Native

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](https://docs.sentry.io/platforms/react-native/configuration/releases.md) documentation.

```javascript
Sentry.init({
  dsn: "___DSN___",
  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.

```bash
export SENTRY_RELEASE="my-project-name@2.3.12"
export SENTRY_DIST="52"
```
