-
Notifications
You must be signed in to change notification settings - Fork 3.6k
docs: Add Sentry MCP error monitoring cookbook #8060
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Create comprehensive Sentry MCP cookbook following PostHog/Netlify structure - Add automated error analysis workflow with AI-powered root cause detection - Include GitHub Actions workflow for continuous error monitoring (runs every 6 hours) - Add cookbook to docs.json navigation in Cookbooks section - All links grounded in official Sentry documentation - Uses Mintlify components consistent with existing cookbooks 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
on: | ||
schedule: | ||
# Run every 6 hours | ||
- cron: "0 */6 * * *" | ||
workflow_dispatch: # Allow manual triggers | ||
|
||
jobs: | ||
monitor-errors: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: "22" | ||
|
||
- name: Install Continue CLI | ||
run: | | ||
npm install -g @continuedev/cli | ||
echo "✅ Continue CLI installed" | ||
|
||
- name: Authenticate GitHub CLI | ||
run: | | ||
echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token | ||
echo "✅ GitHub CLI authenticated" | ||
|
||
- name: Analyze Sentry Errors and Create Issues | ||
env: | ||
CONTINUE_API_KEY: ${{ secrets.CONTINUE_API_KEY }} | ||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} | ||
SENTRY_ORG: ${{ secrets.SENTRY_ORG }} | ||
run: | | ||
echo "🔍 Analyzing Sentry errors..." | ||
cn -p "Using Sentry MCP, analyze errors from the past 6 hours: | ||
1. Filter for unresolved errors with high or critical severity | ||
2. Group similar errors to avoid duplicates | ||
3. For each unique critical error: | ||
- Check if a GitHub issue already exists for this error | ||
- If not, create a new issue with full analysis | ||
- Use gh CLI: gh issue create --title 'title' --body 'body' --label 'bug,sentry,critical' | ||
4. Output summary with created issue URLs | ||
|
||
Sentry Organization: $SENTRY_ORG | ||
Only process errors not already tracked in GitHub." | ||
|
||
- name: Comment on workflow run | ||
if: always() | ||
run: | | ||
echo "✅ Sentry monitoring complete. Check step output for created issues." | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These will always be awkward. I think I am going to pivot this to use the gh-action instead of the MCP so we can summary the data with CN.
The MCP auth will be too awkward and it is not meant to run headless.
https://docs.sentry.io/product/releases/setup/release-automation/github-actions/
- Use [Sentry MCP](https://docs.sentry.io/product/sentry-mcp/) to access [issues](https://docs.sentry.io/product/issues/), [performance data](https://docs.sentry.io/product/performance/), and [release tracking](https://docs.sentry.io/product/releases/) | ||
- Analyze error patterns and stack traces with AI | ||
- Leverage [Sentry's Seer AI](https://docs.sentry.io/product/ai-in-sentry/seer/) for intelligent issue analysis | ||
- Automatically create GitHub issues with root cause analysis |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just open a PR with the fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the area I feel stronger towards opening the issue, maybe biased because my background but having a paper trail and another place to discover issues seems more ideal than an attempt to one shot. I also have less experience with Sentry.
- Make sidebar title match page title - Focus on Sentry Issues only (remove references to Releases/Performance in learning section) - Remove all references to Sentry's Seer AI to avoid confusion - Simplify MCP configuration approach - Fix comment formatting in code blocks for better copy/paste - Consider PR creation instead of just issues (keeping issues for now as PRs need more context) Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <[email protected]>
✅ Patrick's Feedback AddressedThank you for the thorough review @Patrick-Erichsen! I've pushed a commit that addresses all your feedback: Changes Made:
Note on PR vs Issue Creation:Regarding your suggestion about creating PRs with fixes instead of issues - this is a great idea! For this initial cookbook, I've kept it as issue creation because automatic PR generation with meaningful fixes would require:
This would be an excellent enhancement for a v2 of this cookbook once we have better codebase understanding capabilities integrated. The whitespace issue in the rendering should also be resolved with these changes. All changes have been pushed to the branch. Please let me know if you'd like any additional adjustments! |
- Add Sentry MCP error monitoring cookbook to the MCP Integration section - Add dlt data pipelines cookbook to the MCP Integration section - Maintain alphabetical ordering within the MCP cookbook list Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <[email protected]>
- Added Quick Start section similar to PostHog guide - Featured continuedev/sentry-continuous-ai agent from Continue Hub - Improved messaging and structure for faster onboarding - Updated Agent Requirements accordion with Pro Plan option - Fixed table formatting with left-aligned columns - Aligned GitHub CLI vs MCP messaging with PostHog guide Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <[email protected]>
- Reordered tabs in Step 1 to prioritize MCP configuration - Configure Sentry MCP is now the leftmost tab for better visibility Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <[email protected]>
- Added clarification that STDIO mode is for local development or self-hosted Sentry - Included environment variable configuration option (SENTRY_ACCESS_TOKEN, SENTRY_HOST) - Added Info box explaining --host parameter requirement with examples - Matches official Sentry MCP documentation Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <[email protected]>
- SVG icon not rendering properly, using emoji fallback - Matches PostHog guide formatting Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <[email protected]>
- Let rocket icon handle the visual representation - Cleaner appearance without duplicate visual elements Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <[email protected]>
- Integrated Sentry Release GitHub Action for release tracking - Enhanced workflow to create Sentry releases on push to main - Updated Continue CLI prompt to generate comprehensive AI-powered issue descriptions - Added SENTRY_PROJECT to required secrets - Improved workflow summary with GitHub Step Summary - Added documentation on combining Sentry releases with Continue CLI - Link to official Sentry GitHub Actions documentation Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <[email protected]>
|
✅ Review Complete Likely cause: Expired CONTINUE_API_KEY or missing continuedev/review-bot assistant 📋 View workflow logs for details. |
- Changed sidebarTitle from 'Automated Error Analysis with Sentry MCP' to 'Sentry Automated Error Analysis with MCP' - Improves discoverability by having Sentry as the first word Generated with [Continue](https://continue.dev) Co-Authored-By: Continue <[email protected]>
Updated the sidebar title to have "Sentry" as the first word for SEO and sitemap optimization. This ensures better discoverability and aligns with our partnership strategy - having the partner product name first in navigation helps with both user discovery and search engine indexing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1 issue found across 3 files
Prompt for AI agents (all 1 issues)
Understand the root cause of the following 1 issues and fix them.
<file name="docs/guides/sentry-mcp-error-monitoring.mdx">
<violation number="1" location="docs/guides/sentry-mcp-error-monitoring.mdx:424">
The Sentry token scopes listed here omit `project:releases`, but the workflow above calls `getsentry/action-release@v1`, which requires that scope to create releases. Add `project:releases` so readers don’t end up with a failing workflow.</violation>
</file>
React with 👍 or 👎 to teach cubic. Mention @cubic-dev-ai
to give feedback, ask questions, or re-run the review.
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Summary
Adds a comprehensive Sentry MCP error monitoring cookbook that aligns with existing PostHog and Netlify cookbooks.
Changes
New cookbook:
/guides/sentry-mcp-error-monitoring.mdx
Navigation update: Added Sentry cookbook to
docs.json
Cookbooks sectionFeatures
Testing
🤖 Generated with Claude Code
Summary by cubic
Adds a Sentry MCP error monitoring cookbook that automates error analysis and opens actionable GitHub issues. Also adds the cookbook to the docs navigation.