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

Bind the Version

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 or spaces
  • use a forward slash ("/"), back slash ("\"), period ("."), or double period ("..")
  • exceed 200 characters
Copied
SentrySDK.start { options in
    options.releaseName = "1.0.0"
}

If no release name is set the SDK creates a default combined of CFBundleIdentifier, CFBundleShortVersionString and CFBundleVersion.

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

Release Health

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.

To benefit from the health data you must use at least version 5.0.0 of the Cocoa SDK and enable the collection of the release health metrics by adding "enableAutoSessionTracking": true into options during the initialization of the SDK.

Copied
SentrySDK.start { options in
    options.dsn = "https://examplePublicKey@o0.ingest.sentry.io/0"
    options.enableAutoSessionTracking = true
}

The SDK will automatically manage the start and end of the sessions when the application is started, goes to background, returns to the foreground, etc.

By default, the session is terminated once the application is in the background for more than 30 seconds. You can change the time out with the option named sessionTrackingIntervalMillis. It takes the amount in milliseconds. For example, to configure it to be 60 seconds:

Copied
SentrySDK.start { options in
    options.dsn = "https://examplePublicKey@o0.ingest.sentry.io/0"
    options.enableAutoSessionTracking = true
    options.sessionTrackingIntervalMillis = 60000
}
You can edit this page on GitHub.
Package:
cocoapods:sentry-cocoa
Version:
5.2.2
Repository:
https://github.com/getsentry/sentry-cocoa