Releases & Health

Learn how to configure your SDK to tell Sentry about your releases.

A release is a version of your code that is deployed to an environment. 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

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.

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 documentation.

To use the Release Health features, you need to activate the release-health feature flag of the sentry crate (enabled by default). Additionally, you need to initialize the SDK by specifying additional options:

Copied
use sentry;

let _guard = sentry::init(("", sentry::ClientOptions {
    // The `sentry::release_name` macro automatically infers the release from the cargo metadata, and is the preferred way to set the release
    release: sentry::release_name!(),
    // OR, manually:
    // release: Some("my-project-name@2.3.12".into()),

    // Enables automatic session tracking, according to the configured `session_mode`.
    // If the value of this option is set `false`, sessions need to be manually managed using `sentry::start_session` and `sentry::stop_session`.
    auto_session_tracking: true,

    // Sets the automatic session tracking mode.
    // Possible values are `sentry::SessionMode::Application` and `sentry::SessionMode::Request`.
    // `Application` should be used for user-attended programs, which typically have a single long running session that span the application's lifetime.
    // `Request` should be used for servers, where each incoming request shall be considered as its own session.
    session_mode: sentry::SessionMode::Application,

    ..Default::default()
}));

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 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 for further information about integrations, associating commits, and telling Sentry when deploying releases.

Monitor the health of releases by observing user adoption, usage of the application, percentage of crashes, and session data. 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 graphs and filters.

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

A session represents the interaction between the user and the application. Sessions contain a timestamp, a status (if the session was OK or if it crashed), and are always linked to a release.

Was this helpful?
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").