How do I tag errors with the release they came from?

Set release in Sentry.init to a value that changes with every deploy, such as climbing-booking@2.4.0. Monitoring stores it on each error, log line and span, up to 200 characters. Each issue lists the releases of its newest events, and a source map uploaded with the same release can match events that carry no debug ID.

Last updated 26 November 2026. By Paul Badarau.

Jonas, a fictional developer, deploys a booking site for a climbing gym several times a week. When a visitor reports a broken calendar, he wants to know whether the error started with Thursday's deploy. He adds the release to his SDK setup:

Sentry.init({ dsn: MONITORING_DSN, release: 'climbing-booking@' + BUILD_VERSION, environment: 'production' })

Here BUILD_VERSION stands for a value his build step writes into the bundle, such as the version in package.json or the commit hash.

  1. Choose one format and keep it, for example name and version, or the commit hash. Every deploy needs a new value.
  2. Set the value at build time, so the code you deploy and the source maps you upload carry the same string.
  3. Pass it as release in Sentry.init. The SDK adds it to errors, log lines and spans.
  4. If your source maps have no debug IDs, send the same value in the x-postdeploy-release header of the upload, with the file path in x-postdeploy-file. An event with no debug ID can then match that map by release and file.
  5. After the next deploy, open an issue. It lists the releases of its newest stored events, and each occurrence shows its own release and environment. Log lines show theirs in their details.

Events sent before you add a release have none, and they keep none. Monitoring keeps raw events for 7 days, so the release list on an issue covers about the last week at most.

A release is a label on each event. It does not group anything: one issue can span several releases, and the Errors list has no release filter. To see whether a deploy brought an error, compare the issue's first seen time with the deploy and check which releases its events list.

The product page for this is Monitoring.

Start your 14-day free trial