---
title: "Releases & Health"
description: "Learn how to configure your Sentry Flutter SDK to tell Sentry about your releases."
url: https://docs.sentry.io/platforms/dart/guides/flutter/configuration/releases/
---

# Releases & Health for Flutter

A release is a version of your code that is deployed to an [environment](https://docs.sentry.io/platforms/dart/guides/flutter/configuration/environments.md). When you give Sentry information about your releases, you can:

* Determine issues and regressions introduced in a new release
* Predict which commit caused an issue and who is likely responsible
* Resolve issues by including the issue number in your commit message
* Receive email notifications when your code gets deployed

## [Bind the Version](https://docs.sentry.io/platforms/dart/guides/flutter/configuration/releases.md#bind-the-version)

Include a release ID (often called a "version") when you initialize the SDK.

There are some release name restrictions and conventions to be aware of. [Learn more about naming releases](https://docs.sentry.io/product/releases/naming-releases.md).

Releases can also be auto-created by different systems—for example, when uploading a source map, or by some clients when an event that is tagged with a release is ingested. Therefore, it's important to set the release name when building and deploying your application. Learn more in our [Releases](https://docs.sentry.io/platform-redirect.md?next=/configuration/releases/) documentation.

## [Setting a Release](https://docs.sentry.io/platforms/dart/guides/flutter/configuration/releases.md#setting-a-release)

```dart
await SentryFlutter.init((options) {
  options.release = 'my-project-name@2.3.12+12';
});

// or define SENTRY_RELEASE via Dart environment variable (--dart-define) if you are using Flutter Web.
```

If no release name is set for Android and iOS, the SDK creates a default combined of `packageName, versionName and versionCode`, for example `my.project.name@2.3.12+1234`.

How you make the release name (or version) available to your code is up to you. For example, you could use an environment variable that is set during the build process or during initial start-up.

Setting the release name tags each event with that release name. We recommend that you tell Sentry about a new release before sending events with that release name, as this will unlock a few more features. Learn more in our [Releases](https://docs.sentry.io/product/releases.md) documentation.

If you don't tell Sentry about a new release, Sentry will automatically create a release entity in the system the first time it sees an event with that release ID.

After configuring your SDK, you can install a repository integration or manually supply Sentry with your own commit metadata. Read our documentation about [setting up releases](https://docs.sentry.io/product/releases/setup.md) for further information about integrations, associating commits, and telling Sentry when deploying releases.

## [Release Health](https://docs.sentry.io/platforms/dart/guides/flutter/configuration/releases.md#release-health)

Monitor the [health of releases](https://docs.sentry.io/product/releases/health.md) by observing user adoption, usage of the application, percentage of [crashes](https://docs.sentry.io/product/releases/health.md#crashes--unhandled), and [session data](https://docs.sentry.io/product/releases/health.md#sessions). Release health will provide insight into the impact of crashes and bugs as it relates to user experience, and reveal trends with each new issue through the [Release Details](https://docs.sentry.io/product/releases/release-details.md) graphs and filters.

In order to monitor release health, the SDK sends session data.

### [Sessions](https://docs.sentry.io/platforms/dart/guides/flutter/configuration/releases.md#sessions)

A session represents the interaction between the user and the application. Sessions include timestamps and health information and are linked to a release. The SDK manages sessions automatically by default.

On Android, iOS, and macOS, the SDK records unhandled Flutter errors as unhandled, non-terminating errors instead of marking the session as crashed. Native crashes that terminate the process are still crashes.

Unhandled Flutter errors dropped by `sampleRate` also update release health, so reducing the error sample rate does not hide those errors from session health. Events dropped by your event processors or `beforeSend` do not follow this sampling path.

On web, the Flutter SDK uses Sentry JavaScript SDK 11. Unhandled errors captured from Dart or JavaScript set the browser session status to `unhandled` instead of `crashed`. Unlike the native non-terminating behavior above, `unhandled` is a terminal status for browser sessions.

For errors captured through the Dart SDK, web sessions are updated only after error sampling. Errors dropped by `sampleRate` do not update web release health.

Account for these changes when comparing crash-free metrics and alerts before and after upgrading.

#### [Mobile](https://docs.sentry.io/platforms/dart/guides/flutter/configuration/releases.md#mobile)

By default, the session is terminated once the application is in the background for more than `30 seconds`. You can change this default by setting the `autoSessionTrackingInterval` option to a `Duration` of your choosing.

```dart
await SentryFlutter.init((options) {
  options.autoSessionTrackingInterval = const Duration(seconds: 60);
});
```

#### [Web](https://docs.sentry.io/platforms/dart/guides/flutter/configuration/releases.md#web)

Requires SDK version `9.0.0` or higher.

On web it's required to use the `SentryNavigatorObserver` since sessions are tied to navigation events, and for your navigation routes to have names, for example using `RouteSettings`. Read more [here](https://docs.sentry.io/platforms/dart/guides/flutter/integrations/routing-instrumentation.md#1-add-sentrynavigationobserver) on how to add the `SentryNavigatorObserver` to your app.

If you don't use the `SentryNavigatorObserver` then sessions will not be tracked in your application. Once you have set up the `SentryNavigatorObserver` make sure every route has a unique name otherwise the release health could be inconsistent and inaccurate.

#### [Disable Auto Session Tracking](https://docs.sentry.io/platforms/dart/guides/flutter/configuration/releases.md#disable-auto-session-tracking)

If you'd like to opt out of capturing sessions, set the `enableAutoSessionTracking` option to `false`. If you disable this feature, release health will not be available.

```dart
await SentryFlutter.init((options) {
  options.enableAutoSessionTracking = false;
});
```
