Releases

A release is a version of your code that is deployed to an environment. When you give Sentry information about your releases, you unlock a number of new features:

  • Determine the 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 sourcemaps to minified JavaScript to view original untransformed source code.

Configuring Releases

Configuring releases fully is a 3-step process:

  1. Tag Your Errors
  2. Link a Repository and Associate Commits
  3. Tell Sentry When You Deploy a Release

Tag Your Errors

Include a release ID (a.k.a version) where you configure your client SDK. This is commonly a git SHA or a custom version number (check language-specific docs for exact syntax):

SentryClient.setRelease({
  release: "6d5a6a446805a06154e25e2fa203d67b9e762f5d"
});

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 annotates each error with the release. We recommend that you tell Sentry about a new release prior to deploying it as this will unlock a few more features (explained in Step 2) . But if you don’t, Sentry will automatically create a release entity in the system the first time it sees an error with that release ID.

After this, you should see information about the release, such as new issues and regressions introduced in the release.

../../_images/releases-overview.png

Tell Sentry When You Deploy a Release

Tell Sentry when you deploy a release and we’ll automatically send an email to Sentry users who have committed to the release that is being deployed.

../../_images/deploy-emails.png

You must have environment context set in your SDK in order to use this feature. To let Sentry know you’ve deployed, just send an additional request after creating a release:

sentry-cli releases deploys VERSION new -e ENVIRONMENT

You can also use our API to create a deploy.

Release Artifacts

Javascript and iOS projects can utilize release artifacts to unminify or symbolicate error stack traces. To learn more, please check out our iOS and JavaScript docs.