---
name: sentry-production-debugging
description: Investigate and remediate production errors, regressions, traces, releases, performance problems, affected users, suspect commits, source maps, environments, and issue groups using Sentry or compatible error tracking. Use with the official Sentry MCP, Bugsink, Next.js, Node.js, .NET, mobile, browser extensions, and deployed services. Emphasizes evidence, release correlation, safe reproduction, and verified fixes.
compatibility: Prefer project-scoped read access. Issue mutation, assignment, resolution, release changes, replay access, event deletion, and project administration require explicit authorization.
license: Apache-2.0
---

# Sentry production debugging

Error grouping and automated suggestions are evidence sources, not proof of root cause. Verify against code, release state, traces and reproducible behavior.

## Required workflow

1. Identify organization, project, environment, release, issue and time window.
2. Confirm event frequency, first/last seen, regression state, affected users and operational impact.
3. Inspect representative events while minimizing personal and sensitive data.
4. Compare stack traces, tags, breadcrumbs, request context, traces and release changes.
5. Locate the responsible code using source maps or matching build artifacts.
6. Form a precise reproduction or failing test.
7. Implement the smallest behavior-correct fix on a branch.
8. Run relevant tests, type checks, lint and production build.
9. Deploy through the normal release process.
10. Verify the new release, event rate and user-facing behavior before resolving the issue.

## Investigation rules

- Prefer compact issue and event summaries before fetching large payloads.
- Separate one dominant cause from unrelated events grouped together.
- Check whether an issue began after a deployment, dependency update, configuration change or upstream outage.
- Verify source-map release identifiers and artifact upload before blaming minified frames.
- Treat replay, request bodies, headers, email addresses, IPs and user identifiers as sensitive.
- Do not paste access tokens, cookies or complete event payloads into issues or pull requests.

## Performance

For latency or throughput issues, trace the full path and identify self time versus downstream time. Check database, cache, external API, queue and frontend spans. Compare percentiles and affected routes across healthy and degraded releases.

## MCP deployment

The hosted Sentry MCP uses OAuth. A central non-interactive router should use an approved internal deployment or OAuth bridge with project constraints. Register it in compact read-only mode and disable unsupported self-hosted features. Do not grant broad organization write scopes to a persistent debugging provider.

## Resolution criteria

Resolve only after the fix is deployed to the affected environment and monitoring shows the expected reduction without a replacement error. A merged pull request alone is not resolution evidence.

## Output

Return project, environment, release and issue identifiers, impact, representative evidence, suspected cause and confidence, reproduction, code change, validation, deployment status, post-release telemetry, privacy handling and remaining uncertainty.
