Releases & Health
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 configure your client SDK. This ID is commonly a git SHA or a custom version number.
The release name cannot:
- contain newlines, tabulator characters, forward slashes(
/) or back slashes(
- be (in their entirety) period (
.), double period (
..), or space (
- exceed 200 characters
Releases are global per organization; prefix them with something project-specific for easy differentiation.
#include <sentry.h> sentry_options_t *options = sentry_options_new(); sentry_options_set_release(options, "firstname.lastname@example.org"); sentry_init(options);
How you make the version available to your code is up to you. For example, you could use an environment variable that is set during the build process.
This tags each event with the release value. We recommend that you tell Sentry about a new release before deploying it, as this will unlock a few more features as discussed in our documentation about releases. But if you don’t, 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.
The SDK will automatically manage the start and end of the sessions when the SDK is initialized.
To benefit from the health data, you must use at least version 0.4.0 of the Native SDK.
Release health is captured, by default, unless you specifically disabled collecting it in the initialization options for the SDK.
The SDK automatically starts a new session when it is initialized via
sentry_init, and will end that session automatically when the SDK is shut down via
sentry_shutdown, or explicitly by calling
The SDK currently tracks only one concurrent session and will end the running session when using
sentry_start_session. If you prefer to start sessions manually, consider disabling automatic session tracking during initialization:
sentry_options_t *options = sentry_options_new(); sentry_options_set_release(options, "email@example.com"); sentry_options_set_auto_session_tracking(options, 0); sentry_init(options); // ... sentry_start_session(); // Operations covered by the session go here. sentry_end_session();