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
Additionally, releases are used for applying source maps to minified JavaScript to view original, untransformed source code.
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.
import io.sentry.Sentry;
Sentry.init(options -> {
options.setRelease("my-project-name@2.3.12");
});
When using Sentry in Spring Boot application, thanks to Spring Boot Starter the release field is set automatically. See our documentation for Advanced Usage of the Spring Boot integration for more details.
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 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. Most Sentry SDKs can manage sessions automatically.
To benefit from the health data, you must manually instrument your application by calling the public APIs Sentry.startSession()
and Sentry.endSession()
at the appropriate times. For example, in a desktop application, you can start the session when the application launches and end it when the application terminates (or when it is sent to the background for longer than a certain period of time).
Additionally, to display the Crash Free Users percentage, you must also specify a distinctId
. We recommend setting this to a user id (or an equivalent identifier) for your application:
import io.sentry.Sentry;
Sentry.init(options -> {
options.setDistinctId(userId);
});
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").