sentry-incident-runbook
Manage incident response procedures using Sentry. Use when investigating production issues, triaging errors, or creating incident response workflows. Trigger with phrases like "sentry incident response", "sentry triage", "investigate sentry error", "sentry runbook".
Install
mkdir -p .claude/skills/sentry-incident-runbook && curl -L -o skill.zip "https://mcp.directory/api/skills/download/6314" && unzip -o skill.zip -d .claude/skills/sentry-incident-runbook && rm skill.zipInstalls to .claude/skills/sentry-incident-runbook
About this skill
Sentry Incident Runbook
Overview
Structured incident response framework built on Sentry's error monitoring platform. Covers the full lifecycle from alert detection through severity classification, root cause investigation using Sentry's breadcrumbs and stack traces, Discover queries for impact analysis, stakeholder communication, resolution via the Sentry API, and postmortem documentation with Sentry data exports.
Prerequisites
- Sentry account with project-level access and auth token (
SENTRY_AUTH_TOKEN) - Organization slug (
SENTRY_ORG) and project slug (SENTRY_PROJECT) configured @sentry/node(v8+) or equivalent SDK installed in the application- Alert rules configured for critical error thresholds
- Notification channels connected (Slack integration or PagerDuty)
Instructions
Step 1 — Classify Severity
Assign a severity level based on error frequency and user impact. This determines response time and escalation path.
| Severity | Error Criteria | User Impact | Response Time | Escalation |
|---|---|---|---|---|
| P0 — Critical | Crash-free rate below 95% or unhandled exception spike >500/min | Core flow blocked for all users, data loss risk | 15 minutes | PagerDuty page to on-call engineer |
| P1 — Major | New issue affecting >100 unique users per hour | Key feature degraded, no workaround | 1 hour | Slack #incidents channel, tag team lead |
| P2 — Minor | New issue affecting <100 unique users per hour | Feature degraded but workaround exists | Same business day | Slack #alerts-production |
| P3 — Low | Edge case, cosmetic error, staging-only issue | Minimal or no user-facing impact | Next sprint | Add to backlog, assign owner |
Decision logic for classification:
Alert fires →
├── Check crash-free rate (Project Settings → Crash Free Sessions)
│ └── Below 95%? → P0
├── Check unique users affected (Issue Details → Users tab)
│ ├── >100/hr on core flow? → P1
│ └── <100/hr or workaround exists? → P2
└── Staging-only or edge case? → P3
Step 2 — Triage and Investigate
Execute this checklist within the first 15 minutes of a P0/P1 alert.
Initial triage (Sentry UI):
- Open the Sentry issue link from the alert notification
- Check the error frequency graph — determine if the rate is spiking, steady, or declining
- Read the "First Seen" and "Last Seen" timestamps to determine if this is new or a regression
- Check the "Users" count on the issue to quantify impact
- Verify the environment filter — confirm this is production, not staging
- Check the "Release" tag — identify which deployment introduced the error
- Open "Suspect Commits" to find the likely-causal changeset
Deep investigation (stack trace and breadcrumbs):
- Read the full stack trace — identify the failing function and line number
- Expand the breadcrumbs panel — trace the sequence of events leading to the error (HTTP requests, console logs, navigation, UI clicks)
- Check the user context panel for device, browser, OS, and custom user tags
- Review the "Tags" panel for patterns (specific release, region, browser)
API-based investigation:
# Fetch issue details programmatically
curl -s -H "Authorization: Bearer $SENTRY_AUTH_TOKEN" \
"https://sentry.io/api/0/organizations/$SENTRY_ORG/issues/$ISSUE_ID/" \
| python3 -c "
import json, sys
issue = json.load(sys.stdin)
print(f'Title: {issue[\"title\"]}')
print(f'First Seen: {issue[\"firstSeen\"]}')
print(f'Last Seen: {issue[\"lastSeen\"]}')
print(f'Events: {issue[\"count\"]}')
print(f'Users: {issue[\"userCount\"]}')
print(f'Level: {issue[\"level\"]}')
print(f'Status: {issue[\"status\"]}')
print(f'Platform: {issue.get(\"platform\", \"unknown\")}')
" || echo "ERROR: Failed to fetch issue — check SENTRY_AUTH_TOKEN and ISSUE_ID"
# Fetch latest events for the issue (most recent 5)
curl -s -H "Authorization: Bearer $SENTRY_AUTH_TOKEN" \
"https://sentry.io/api/0/organizations/$SENTRY_ORG/issues/$ISSUE_ID/events/?per_page=5" \
| python3 -c "
import json, sys
events = json.load(sys.stdin)
for e in events:
release = e.get('release', {})
ver = release.get('version', 'N/A') if isinstance(release, dict) else 'N/A'
print(f'Event {e[\"eventID\"][:12]} | {e.get(\"dateCreated\", \"N/A\")} | Release: {ver}')
" || echo "ERROR: Failed to fetch events"
Sentry Discover queries for impact analysis:
# Count total events and unique affected users in last 24 hours
curl -s -H "Authorization: Bearer $SENTRY_AUTH_TOKEN" \
"https://sentry.io/api/0/organizations/$SENTRY_ORG/events/" \
--data-urlencode "field=count()" \
--data-urlencode "field=count_unique(user)" \
--data-urlencode "query=issue.id:$ISSUE_ID" \
--data-urlencode "statsPeriod=24h" \
-G | python3 -c "
import json, sys
data = json.load(sys.stdin)
if 'data' in data and data['data']:
row = data['data'][0]
print(f'Events (24h): {row.get(\"count()\", \"N/A\")}')
print(f'Unique users (24h): {row.get(\"count_unique(user)\", \"N/A\")}')
" || echo "ERROR: Discover query failed"
# Check p95 transaction duration for affected endpoint
curl -s -H "Authorization: Bearer $SENTRY_AUTH_TOKEN" \
"https://sentry.io/api/0/organizations/$SENTRY_ORG/events/" \
--data-urlencode "field=transaction" \
--data-urlencode "field=p95(transaction.duration)" \
--data-urlencode "field=count()" \
--data-urlencode "query=has:transaction event.type:transaction" \
--data-urlencode "statsPeriod=1h" \
--data-urlencode "sort=-count()" \
--data-urlencode "per_page=5" \
-G | python3 -c "
import json, sys
data = json.load(sys.stdin)
if 'data' in data:
for row in data['data']:
txn = row.get('transaction', 'unknown')
p95 = row.get('p95(transaction.duration)', 0)
cnt = row.get('count()', 0)
print(f'{txn}: p95={p95:.0f}ms, count={cnt}')
" || echo "ERROR: Transaction query failed"
Step 3 — Resolve, Communicate, and Document
Identify the root cause pattern:
| Pattern | Diagnostic Signal | Immediate Action |
|---|---|---|
| Deployment regression | "First Seen" aligns with latest deploy timestamp | Rollback via sentry-cli releases deploys $PREV_VERSION new --env production |
| Third-party failure | Breadcrumbs show failed HTTP calls to external hosts | Enable circuit breaker, add retry logic, monitor dependency status |
| Data corruption | Event context contains malformed input samples | Add input validation, fix data pipeline upstream |
| Resource exhaustion | Error rate correlates with traffic spikes (OOM, pool exhaustion) | Scale horizontally, add connection pooling, implement rate limiting |
| SDK misconfiguration | Events missing context, breadcrumbs, or release info | Review Sentry.init() options, verify source maps uploaded |
Resolve the issue via Sentry API:
# Mark issue as resolved (closes the issue)
curl -s -X PUT \
-H "Authorization: Bearer $SENTRY_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"status": "resolved"}' \
"https://sentry.io/api/0/organizations/$SENTRY_ORG/issues/$ISSUE_ID/" \
| python3 -c "import json,sys; d=json.load(sys.stdin); print(f'Status: {d.get(\"status\",\"unknown\")}')" \
|| echo "ERROR: Failed to resolve issue"
# Resolve in next release (auto-reopens on regression)
curl -s -X PUT \
-H "Authorization: Bearer $SENTRY_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"status": "resolved", "statusDetails": {"inNextRelease": true}}' \
"https://sentry.io/api/0/organizations/$SENTRY_ORG/issues/$ISSUE_ID/" \
| python3 -c "import json,sys; d=json.load(sys.stdin); print(f'Status: {d.get(\"status\",\"unknown\")} (regression detection enabled)')" \
|| echo "ERROR: Failed to resolve issue"
# Ignore with threshold (snooze until count exceeds limit)
# Use 100 as the re-alert threshold for noisy low-severity issues
curl -s -X PUT \
-H "Authorization: Bearer $SENTRY_AUTH_TOKEN" \
-H "Content-Type: application/json" \
-d '{"status": "ignored", "statusDetails": {"ignoreCount": 100}}' \
"https://sentry.io/api/0/organizations/$SENTRY_ORG/issues/$ISSUE_ID/" \
| python3 -c "import json,sys; d=json.load(sys.stdin); print(f'Status: {d.get(\"status\",\"unknown\")} (snoozed until 100 events)')" \
|| echo "ERROR: Failed to ignore issue"
Stakeholder communication templates:
Initial alert (send within 15 minutes of P0):
INCIDENT — [Service Name]
Status: Investigating
Impact: [Description of user-facing symptoms]
Started: [Timestamp from Sentry "First Seen"]
Sentry Issue: [Link to issue]
Incident Lead: @[on-call engineer]
Next update: 30 minutes
Resolution notice:
RESOLVED — [Service Name]
Duration: [Total incident time from first alert to resolution]
Root Cause: [One-line description from investigation]
Fix Applied: [What changed — rollback, hotfix, config change]
Postmortem: [Link — due within 48 hours]
Postmortem template with Sentry data:
## Incident Postmortem: [Title from Sentry Issue]
### Timeline
- [HH:MM] Alert fired — Sentry issue [ISSUE_ID] created
- [HH:MM] On-call engineer acknowledged
- [HH:MM] Root cause identified via [breadcrumbs / stack trace / suspect commits]
- [HH:MM] Fix deployed — [rollback / hotfix description]
- [HH:MM] Error rate returned to baseline, issue resolved in Sentry
### Impact (from Sentry Discover)
- **Duration:** [X hours Y minutes]
- **Total events:** [count() from Discover query]
- **Unique users affected:** [count_unique(user) from Discover query]
- **p95 latency during incident:** [p95(transaction.duration) from Discover]
### Root Cause (5 Whys)
1. Why did the error occur? [Direct cause from stack trace]
2. Why was that code path triggered? [From breadcrumbs]
3. Why was it not caught in testing? [Gap analysis]
4. Why did the alert take [X] minutes? [Alert rule review]
5. Why is this class of error possible? [S
---
*Content truncated.*
More by jeremylongshore
View all skills by jeremylongshore →You might also like
flutter-development
aj-geddes
Build beautiful cross-platform mobile apps with Flutter and Dart. Covers widgets, state management with Provider/BLoC, navigation, API integration, and material design.
drawio-diagrams-enhanced
jgtolentino
Create professional draw.io (diagrams.net) diagrams in XML format (.drawio files) with integrated PMP/PMBOK methodologies, extensive visual asset libraries, and industry-standard professional templates. Use this skill when users ask to create flowcharts, swimlane diagrams, cross-functional flowcharts, org charts, network diagrams, UML diagrams, BPMN, project management diagrams (WBS, Gantt, PERT, RACI), risk matrices, stakeholder maps, or any other visual diagram in draw.io format. This skill includes access to custom shape libraries for icons, clipart, and professional symbols.
ui-ux-pro-max
nextlevelbuilder
"UI/UX design intelligence. 50 styles, 21 palettes, 50 font pairings, 20 charts, 8 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient."
godot
bfollington
This skill should be used when working on Godot Engine projects. It provides specialized knowledge of Godot's file formats (.gd, .tscn, .tres), architecture patterns (component-based, signal-driven, resource-based), common pitfalls, validation tools, code templates, and CLI workflows. The `godot` command is available for running the game, validating scripts, importing resources, and exporting builds. Use this skill for tasks involving Godot game development, debugging scene/resource files, implementing game systems, or creating new Godot components.
nano-banana-pro
garg-aayush
Generate and edit images using Google's Nano Banana Pro (Gemini 3 Pro Image) API. Use when the user asks to generate, create, edit, modify, change, alter, or update images. Also use when user references an existing image file and asks to modify it in any way (e.g., "modify this image", "change the background", "replace X with Y"). Supports both text-to-image generation and image-to-image editing with configurable resolution (1K default, 2K, or 4K for high resolution). DO NOT read the image file first - use this skill directly with the --input-image parameter.
fastapi-templates
wshobson
Create production-ready FastAPI projects with async patterns, dependency injection, and comprehensive error handling. Use when building new FastAPI applications or setting up backend API projects.
Related MCP Servers
Browse all serversSafely connect cloud Grafana to AI agents with MCP: query, inspect, and manage Grafana resources using simple, focused o
Integrate with Panther Labs to streamline cybersecurity workflows, manage detection rules, triage alerts, and boost inci
Integrate Rootly's incident management API for real-time production issue resolution in code editors with efficient cont
GitGuardian MCP Server: auto secret scanning, secrets detection, honeytokens, and remediation for secrets management and
Build persistent semantic networks for enterprise & engineering data management. Enable data persistence and memory acro
Enhance software testing with Playwright MCP: Fast, reliable browser automation, an innovative alternative to Selenium s
Stay ahead of the MCP ecosystem
Get weekly updates on new skills and servers.