SE

sentry-deploy-integration

Links CI/CD deployments to Sentry to track release health and identify suspect commits.

Install

mkdir -p .claude/skills/sentry-deploy-integration && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/5945" && unzip -o skill.zip -d .claude/skills/sentry-deploy-integration && rm skill.zip

Installs to .claude/skills/sentry-deploy-integration

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Track deployments and release health in Sentry.
47 charsno explicit “when” trigger
Advanced

Key capabilities

  • Record deployment timing and metadata in Sentry
  • Upload source maps for stack trace resolution
  • Monitor crash-free session and user rates
  • Compare release health metrics

How it works

The skill integrates with CI/CD pipelines to create Sentry releases, upload source maps, and record deployment timestamps using sentry-cli, enabling the correlation of errors with specific commits and releases.

Inputs & outputs

You give it
Deployment version and environment
You get back
Recorded release with associated commits and health metrics

When to use sentry-deploy-integration

  • Automate Sentry release creation in CI
  • Link Git commits to Sentry errors
  • Track release health after deployment
  • Record environment metadata for errors

About this skill

Sentry Deploy Integration

Overview

Wire Sentry into your deploy pipeline so every release is tracked end-to-end: commit association, source map upload, deploy recording, and post-deploy health monitoring. Sentry links errors to the exact deploy and suspect commit that introduced them, giving you crash-free session rates, adoption curves, and regression alerts per release.

Prerequisites

  • Sentry CLI installed (npm i -g @sentry/cli or curl -sL https://sentry.io/get-cli/ | bash)
  • SENTRY_AUTH_TOKEN with project:releases and org:read scopes
  • SENTRY_ORG and SENTRY_PROJECT environment variables set
  • @sentry/node v8+ installed in your application
  • Source control integration enabled in Sentry (Settings > Integrations > GitHub/GitLab)

Instructions

Step 1 --- Record Deploys with sentry-cli

Create a release, associate commits for suspect-commit linking, and record the deployment with timing metadata.

#!/bin/bash
# scripts/sentry-deploy.sh
set -euo pipefail

VERSION="${1:-$(sentry-cli releases propose-version)}"
ENVIRONMENT="${2:-production}"
DEPLOY_START=$(date +%s)

# Create release and associate commits (enables suspect commits)
sentry-cli releases new "$VERSION"
sentry-cli releases set-commits "$VERSION" --auto

# Upload source maps for readable stack traces
sentry-cli sourcemaps upload \
  --release="$VERSION" \
  --url-prefix="~/static/js" \
  --validate \
  ./dist

# Finalize marks the release as ready
sentry-cli releases finalize "$VERSION"

# --- Deploy your application here ---
# e.g., kubectl set image deployment/app app=myapp:$VERSION

DEPLOY_END=$(date +%s)

# Record the deployment in Sentry with timestamps
sentry-cli releases deploys "$VERSION" new \
  -e "$ENVIRONMENT" \
  -t "$DEPLOY_START" \
  -f "$DEPLOY_END"

echo "Sentry deploy recorded: $VERSION -> $ENVIRONMENT ($(( DEPLOY_END - DEPLOY_START ))s)"

For multi-environment promotion (staging then production):

# Stage 1: deploy to staging
sentry-cli releases deploys "$VERSION" new -e staging

# Stage 2: after QA passes, deploy to production
sentry-cli releases deploys "$VERSION" new -e production

# Sentry dashboard shows the full promotion timeline

Step 2 --- Tag Releases in the SDK and Monitor Health

Configure the Sentry SDK with the release tag so crash-free session/user metrics, adoption rates, and error attribution bind to each release.

// src/instrument.ts
import * as Sentry from '@sentry/node';

Sentry.init({
  dsn: process.env.SENTRY_DSN,
  release: process.env.SENTRY_RELEASE,   // e.g. "[email protected]"
  environment: process.env.NODE_ENV,      // "production" | "staging"

  // Release health: session tracking is on by default in v8
  // Crash-free sessions/users calculated automatically

  // Sample 10% of transactions in production
  tracesSampleRate: process.env.NODE_ENV === 'production' ? 0.1 : 1.0,
});

Release health metrics Sentry tracks automatically:

MetricWhat it measures
Crash-free sessions% of sessions with zero unhandled errors
Crash-free users% of distinct users with zero unhandled errors
Adoption% of sessions on this release vs. the previous release
Error countNew and total errors attributed to this release
Session countTotal sessions observed on this release

Step 3 --- Compare Releases, Detect Regressions, and Configure Notifications

Compare releases via the API to catch regressions before they spread:

# List recent releases with new-issue counts and deploy info
curl -s \
  -H "Authorization: Bearer $SENTRY_AUTH_TOKEN" \
  "https://sentry.io/api/0/organizations/$SENTRY_ORG/releases/?project=$SENTRY_PROJECT&per_page=5&health=1" \
  | python3 -c "
import json, sys
releases = json.load(sys.stdin)
for r in releases:
    health = r.get('healthData', {})
    crash_free = health.get('crashFreeSessions', 'N/A')
    new_issues = r.get('newGroups', 0)
    deploys = len(r.get('deploys', []))
    print(f\"{r['version']}: {new_issues} new issues, {deploys} deploys, crash-free: {crash_free}\")
"

Suspect commits --- when set-commits is configured, Sentry traces each new error to the commit that likely introduced it:

# Fetch suspect commits for a specific issue
curl -s \
  -H "Authorization: Bearer $SENTRY_AUTH_TOKEN" \
  "https://sentry.io/api/0/issues/$ISSUE_ID/committers/" \
  | python3 -c "
import json, sys
data = json.load(sys.stdin)
for c in data.get('committers', []):
    author = c['author']['name']
    for commit in c['commits']:
        print(f\"  Suspect: {commit['id'][:8]} by {author} — {commit['message'].splitlines()[0]}\")
"

Deploy notification webhooks --- configure in Project Settings > Integrations > Internal Integrations or use the webhook directly:

// routes/sentry-webhook.ts
import express from 'express';
const router = express.Router();

interface SentryDeployPayload {
  action: string;
  data: {
    deploy: {
      environment: string;
      dateFinished: string;
    };
    release: {
      version: string;
      projects: Array<{ name: string }>;
    };
  };
}

router.post('/webhook/sentry-deploy', (req, res) => {
  const payload = req.body as SentryDeployPayload;

  if (payload.action === 'deploy.created') {
    const { release, deploy } = payload.data;
    console.log(`Deploy: ${release.version} -> ${deploy.environment}`);
    // Trigger post-deploy smoke tests or Slack notification
  }

  res.status(200).json({ ok: true });
});

export default router;

Rollback tracking --- record the rollback as a new deploy pointing to the previous stable version:

ROLLBACK_TO="[email protected]"
sentry-cli releases deploys "$ROLLBACK_TO" new \
  -e production \
  --name "Rollback from $CURRENT_VERSION"
# Sentry attributes new errors to the rolled-back version

Output

After completing these steps you will have:

  • Every deploy recorded in Sentry with environment and timestamps
  • Crash-free session and user rates tracked per release
  • Adoption curves showing rollout progress
  • Suspect commits linking new errors to the exact commit that introduced them
  • Release comparison showing regression counts across versions
  • Deploy notifications flowing to Slack, PagerDuty, or custom webhooks
  • Rollback events visible in the release timeline

Error Handling

ErrorCauseSolution
error: release not foundDeploy created before release existsRun sentry-cli releases new $VERSION before recording the deploy
No release health dataSession tracking disabled or SDK < v7.2Upgrade to @sentry/node v8+; do not set autoSessionTracking: false
Wrong environment on eventsenvironment not set in SDK initPass environment explicitly in Sentry.init()
Suspect commits missingSource control integration not linkedEnable GitHub/GitLab in Settings > Integrations and run set-commits --auto
401 Unauthorized on deploy APIToken missing project:releases scopeRegenerate token at https://sentry.io/settings/account/api/auth-tokens/
Crash-free rate stuck at 100%Release tag mismatch between CLI and SDKEnsure SENTRY_RELEASE in Sentry.init() matches the sentry-cli releases new version exactly
Deploy timestamps zeroMissing -t/-f flags on deploys newCapture $(date +%s) before and after deploy, pass both flags

Examples

TypeScript: Full deploy script with health check polling

// scripts/deploy-and-monitor.ts
import { execSync } from 'child_process';

const VERSION = process.env.SENTRY_RELEASE || execSync('sentry-cli releases propose-version').toString().trim();
const ENV = process.env.DEPLOY_ENV || 'production';
const ORG = process.env.SENTRY_ORG!;
const TOKEN = process.env.SENTRY_AUTH_TOKEN!;

async function checkReleaseHealth(version: string): Promise<void> {
  const res = await fetch(
    `https://sentry.io/api/0/organizations/${ORG}/releases/${encodeURIComponent(version)}/`,
    { headers: { Authorization: `Bearer ${TOKEN}` } }
  );
  const release = await res.json();
  const crashFree = release.healthData?.crashFreeSessions;
  console.log(`Release ${version} crash-free sessions: ${crashFree ?? 'pending'}%`);

  if (crashFree !== undefined && crashFree < 95) {
    console.error(`ALERT: Crash-free rate ${crashFree}% is below 95% threshold`);
    process.exit(1);
  }
}

// Record deploy
execSync(`sentry-cli releases deploys "${VERSION}" new -e ${ENV}`, { stdio: 'inherit' });

// Poll health after deploy
setTimeout(() => checkReleaseHealth(VERSION), 5 * 60 * 1000);

CLI: GitHub Actions integration

# .github/workflows/deploy.yml
name: Deploy with Sentry
on:
  push:
    branches: [main]

jobs:
  deploy:
    runs-on: ubuntu-latest
    env:
      SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
      SENTRY_ORG: my-org
      SENTRY_PROJECT: my-app
    steps:
      - uses: actions/checkout@v4
        with: { fetch-depth: 0 }  # Full history for set-commits

      - run: npm ci && npm run build

      - name: Create Sentry release
        run: |
          VERSION="my-app@${{ github.sha }}"
          npx @sentry/cli releases new "$VERSION"
          npx @sentry/cli releases set-commits "$VERSION" --auto
          npx @sentry/cli sourcemaps upload --release="$VERSION" ./dist
          npx @sentry/cli releases finalize "$VERSION"

      - name: Deploy to production
        run: ./scripts/deploy.sh

      - name: Record deploy in Sentry
        run: |
          VERSION="my-app@${{ github.sha }}"
          npx @sentry/cli releases deploys "$VERSION" new -e production

Resources


Content truncated.

When not to use it

  • When source control integration is not enabled in Sentry

Prerequisites

Sentry CLISENTRY_AUTH_TOKENSENTRY_ORG and SENTRY_PROJECT environment variables@sentry/node v8+

Limitations

  • Requires SENTRY_AUTH_TOKEN with specific scopes
  • Requires source control integration enabled

How it compares

This method automates the binding of deployment metadata to error data, providing automated regression alerts and crash-free metrics that are not available with manual error monitoring.

Compared to similar skills

sentry-deploy-integration side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
sentry-deploy-integration (this skill)126dCautionAdvanced
gcp-cloud-run55moReviewIntermediate
flow-nexus-platform64moReviewBeginner
smithery-mcp-deployment88moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

More by jeremylongshore

View all by jeremylongshore

analyzing-logs

jeremylongshore

Analyze application logs to detect performance issues, identify error patterns, and improve stability by extracting key insights.

14123

ollama-setup

jeremylongshore

Configure auto-configure Ollama when user needs local LLM deployment, free AI alternatives, or wants to eliminate hosted API costs. Trigger phrases: "install ollama", "local AI", "free LLM", "self-hosted AI", "replace OpenAI", "no API costs". Use when appropriate context detected. Trigger with relevant phrases based on skill purpose.

1167

backtesting-trading-strategies

jeremylongshore

Backtest crypto and traditional trading strategies against historical data. Calculates performance metrics (Sharpe, Sortino, max drawdown), generates equity curves, and optimizes strategy parameters. Use when user wants to test a trading strategy, validate signals, or compare approaches. Trigger with phrases like "backtest strategy", "test trading strategy", "historical performance", "simulate trades", "optimize parameters", or "validate signals".

1071

generating-database-seed-data

jeremylongshore

Process this skill enables AI assistant to generate realistic test data and database seed scripts for development and testing environments. it uses faker libraries to create realistic data, maintains relational integrity, and allows configurable data volumes. u... Use when working with databases or data models. Trigger with phrases like 'database', 'query', or 'schema'.

1033

cursor-codebase-indexing

jeremylongshore

Execute set up and optimize Cursor codebase indexing. Triggers on "cursor index setup", "codebase indexing", "index codebase", "cursor semantic search". Use when working with cursor codebase indexing functionality. Trigger with phrases like "cursor codebase indexing", "cursor indexing", "cursor".

885

testing-mobile-apps

jeremylongshore

Execute mobile app testing on iOS and Android devices/simulators. Use when performing specialized testing. Trigger with phrases like "test mobile app", "run iOS tests", or "validate Android functionality".

810

You might also like

gcp-cloud-run

aj-geddes

Deploy containerized applications on Google Cloud Run with automatic scaling, traffic management, and service mesh integration. Use for container-based serverless computing.

5107

flow-nexus-platform

ruvnet

Comprehensive Flow Nexus platform management - authentication, sandboxes, app deployment, payments, and challenges

691

smithery-mcp-deployment

CaullenOmdahl

Best practices for creating, optimizing, and deploying MCP servers to Smithery. Use this skill when:(1) Creating new MCP servers for Smithery deployment(2) Optimizing quality scores (achieving 90/100)(3) Troubleshooting deployment issues (0/0 tools, missing annotations, low scores)(4) Migrating existing MCP servers to Smithery format(5) Understanding Smithery's schema format requirements(6) Adding workflow prompts, tool annotations, or documentation resources(7) Configuring smithery.yaml and package.json for deployment

881

deployment-pipeline-design

wshobson

Design multi-stage CI/CD pipelines with approval gates, security checks, and deployment orchestration. Use when architecting deployment workflows, setting up continuous delivery, or implementing GitOps practices.

670

vercel-deployment

davila7

Expert knowledge for deploying to Vercel with Next.js Use when: vercel, deploy, deployment, hosting, production.

359

netlify-deploy

openai

Deploy web projects to Netlify using the Netlify CLI (`npx netlify`). Use when the user asks to deploy, host, publish, or link a site/repo on Netlify, including preview and production deploys.

740

Search skills

Search the agent skills registry