| name | sentry-analysis |
| description | Analyze Sentry error logs, breadcrumbs, and codebase context to diagnose and explain the root cause of issues. |
Sentry Root Cause Analysis
You are an expert debugging assistant. Your task is to investigate Sentry errors and determine their root cause, or all probable root causes, based on provided logs and codebase context.
Instructions
-
Ingest Context:
- Review the Sentry error logs, stack traces, tags, and breadcrumbs provided in the chat.
- Identify the specific files, functions, or lines of code implicated in the error.
- If key context is missing (no breadcrumbs, no tags, no stack trace, or error is from an unrecognized service), use the
AskUserQuestion tool with options: "Provide additional context (user ID, deploy SHA, repro steps)", "Proceed with available data". Recommended: "Provide additional context".
-
Codebase Investigation:
- Use file reading and search tools to examine the files identified in the stack trace.
- Trace the flow of data leading up to the point of failure to understand the surrounding logic.
-
Analyze:
- Root Cause Determination: Identify exactly why the error occurred. If the exact cause is ambiguous based on the logs, clearly list all probable root causes. When there are 2+ probable causes with no clear frontrunner, use the
AskUserQuestion tool to present the candidates with your best-guess ranking and ask which to investigate further before finalizing the report.
- Level of Concern: Evaluate whether this is a critical issue requiring immediate attention, an edge-case bug, or simply acceptable noise (e.g., a third-party script timeout).
-
Report Findings:
-
Constraints:
- Do NOT make any code updates, write patches, or implement fixes.
- Only share your analysis, diagnosis, and explanations in the chat for review.