Using Sentry Release Tracking to Speed Up Rollback Decisions
When a new release spikes errors, knowing the exact commit that broke the app is critical. Sentry’s Release Tracking tags each event with the release version, letting you filter, alert, and roll back faster. This guide shows how to enable it, use it in CI/CD, and what to watch out for.
29 Sept 2026, 00:22 UTC

Problem: “Which release broke the app?”
In a typical development cycle, a new deployment can introduce subtle bugs that only surface after a user interacts with the changed code. Sentry captures the error, but without a clear link to the exact release, developers spend valuable time hunting through commits, comparing diffs, and replaying the issue in a staging environment. The result is delayed fixes and higher customer impact.
Thesis: Tag every event with the release version and you’ll cut triage time in half.
By enabling Sentry’s Release Tracking, every event automatically carries a release tag that matches the version you push to your repository. The Sentry UI then lets you filter, group, and alert on errors per release, giving you a precise view of which deployment introduced a problem. This single change can dramatically improve your rollback decision process.
Section 1 – Setting up Release Tracking
Release Tracking works on the client‑side SDK and the sentry-cli tool. The key is that both must use the same release identifier. The most common approach is to generate the release in your CI pipeline and pass it to the SDK via an environment variable.
1.1 Create the Release with sentry-cli
Run this in your CI after the build step but before the deploy step. The command creates a release entry in Sentry and uploads source maps if you need them.
# Example for a GitHub Actions job
# Set the release version to the Git tag or a semantic version
RELEASE_VERSION=$(git describe --tags --always)
# Create the release in Sentry
sentry-cli releases new $RELEASE_VERSION
# (Optional) Attach source maps or other artifacts
sentry-cli releases files $RELEASE_VERSION upload-sourcemaps ./dist
# Finalise the release – this marks it as ready for deployment
sentry-cli releases finalize $RELEASE_VERSION
Permissions: The sentry-cli binary needs the auth token that has at least project:releases scope. Store the token in your CI secrets and export it as SENTRY_AUTH_TOKEN before running the commands.
1.2 Tell the SDK to use the same release
Most SDKs support a release option. In Node.js you can do:
const Sentry = require('@sentry/node');
Sentry.init({
dsn: process.env.SENTRY_DSN,
release: process.env.SENTRY_RELEASE, // e.g. "myapp@1.2.3"
});
In a CI pipeline you set the environment variable to the same value you used with sentry-cli:
export SENTRY_RELEASE=$RELEASE_VERSION
For other languages, consult the SDK docs – most expose a release configuration key or an environment variable named SENTRY_RELEASE or RELEASE.
1.3 Verify the linkage
After deployment, trigger a test error (e.g., throw an exception in a test endpoint). Open Sentry, go to the Issues tab, and use the filter bar to type release:myapp@1.2.3. The error should appear. If it doesn’t, double‑check that the SDK’s release string matches exactly what sentry-cli used.
Section 2 – Using Release Tracking in the UI
Once the release tag is present, Sentry’s grouping algorithm treats errors that appear only in a particular release as separate groups. This reduces noise for stable releases and surfaces new regressions immediately.
2.1 Filter by Release
In the Sentry UI, the filter bar accepts release: queries. For example:
release:myapp@1.2.3
You can also combine with other filters: environment:production release:myapp@1.2.3. This is handy when you have multiple environments (staging, production) and want to isolate production-only regressions.
2.2 Set an Alert for Spike in Errors
Navigate to Alerts & Rules → Project Alerts → Create Rule. Choose the Release trigger type, set a threshold (e.g., “More than 5 new errors in the last 15 minutes”), and add a notification channel (Slack, email, etc.). This rule fires immediately when a new release introduces a spike, prompting a quick rollback.
Section 3 – Trade‑offs and Limitations
- Storage Cost: Every event now carries an extra tag. In high‑volume projects this can increase storage usage and, over time, retention costs. Monitor your
Data Retentionsettings and adjust if necessary. - Tag Mismatch: If the SDK’s
releasevalue differs from the CLI’s, the event will be untagged or mis‑tagged. This breaks filtering and can lead to mis‑grouped issues. Keep a single source of truth – usually the CI script that setsSENTRY_RELEASE. - Legacy Projects: Some older SDKs may not support release tags or require a manual patch. In those cases you can still use the
sentry-cli releases set-commitscommand to associate a release with commits, but the automatic event tagging will be missing. - Retention Policy: Releases are subject to the project’s data retention. If you keep a short retention window, older releases and their events may disappear, making historical analysis impossible.
Section 4 – Actionable Takeaway
Enable Release Tracking in your CI pipeline, set the same release string in the SDK, and add an automated alert for error spikes per release. Then:
- Deploy a new version.
- Monitor the Release alert channel.
- If the alert fires, filter the Sentry UI by that release, identify the root cause quickly, and roll back if needed.
- After fixing, create a new release and repeat.
With this workflow, you turn a blind spot into a visible, actionable metric, reducing mean time to recovery and keeping your users happier.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.