Skip to content

Conversation

bdougie
Copy link
Collaborator

@bdougie bdougie commented Oct 1, 2025

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

    • OAuth authentication setup with Sentry MCP
    • Quick Start vs Manual Setup workflow tabs
    • AI-powered error analysis using Sentry's Seer
    • GitHub Actions workflow for continuous monitoring (every 6 hours)
    • Integration with GitHub CLI for issue creation
  • Navigation update: Added Sentry cookbook to docs.json Cookbooks section

Features

  • Automated error analysis and root cause detection
  • GitHub issue creation with suggested fixes
  • All CLI commands and endpoints grounded in official Sentry MCP docs
  • Consistent Mintlify components (Card, Steps, Tabs, Info, Warning, etc.)
  • Security best practices and troubleshooting guide

Testing

  • Verify cookbook appears in docs navigation
  • Test all Sentry MCP links resolve correctly
  • Validate GitHub Actions workflow syntax

🤖 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.

  • New Features
    • New guide: guides/sentry-mcp-error-monitoring.mdx
    • Setup with Sentry MCP OAuth (plus STDIO token option) and Quick Start vs Manual Setup tabs
    • Error analysis using Sentry Seer with prompts for grouping and prioritization
    • GitHub issue creation via gh CLI with recommended labels and Sentry links
    • GitHub Actions example for continuous monitoring (runs every 6 hours)
    • Added to Cookbooks in docs.json

- 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]>
Comment on lines 306 to 355
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."
```
Copy link
Collaborator Author

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
Copy link
Collaborator

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?

Copy link
Collaborator Author

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]>
@bdougie
Copy link
Collaborator Author

bdougie commented Oct 2, 2025

✅ Patrick's Feedback Addressed

Thank you for the thorough review @Patrick-Erichsen! I've pushed a commit that addresses all your feedback:

Changes Made:

  1. ✅ Fixed sidebar title - Now matches the page title "Automated Error Analysis with Sentry MCP"

  2. ✅ Focused on Issues only - Removed references to Releases and Performance monitoring in the learning objectives section, keeping the focus solely on Sentry Issues as suggested

  3. ✅ Removed all Sentry Seer AI references - Eliminated the confusion about "using Continue AI to use another AI product" by removing all mentions of Sentry's Seer AI throughout the document

  4. ✅ Cleaned up code block comments - Fixed the bash comment formatting that was preventing clean copy/paste functionality

  5. ✅ Simplified MCP configuration - Streamlined to follow standard MCP patterns

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:

  • Deep context about the specific codebase structure
  • Access to the actual error context and surrounding code
  • More sophisticated code generation capabilities

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]>
bdougie and others added 3 commits October 2, 2025 16:11
- 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]>
@bdougie bdougie marked this pull request as ready for review October 2, 2025 23:28
@bdougie bdougie requested a review from a team as a code owner October 2, 2025 23:28
@bdougie bdougie requested review from tingwai and removed request for a team October 2, 2025 23:28
@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Oct 2, 2025
Copy link

github-actions bot commented Oct 2, 2025

⚠️ PR Title Format

Your PR title doesn't follow the conventional commit format, but this won't block your PR from being merged. We recommend using this format for better project organization.

Expected Format:

<type>[optional scope]: <description>

Examples:

  • feat: add changelog generation support
  • fix: resolve login redirect issue
  • docs: update README with new instructions
  • chore: update dependencies

Valid Types:

feat, fix, docs, style, refactor, perf, test, build, ci, chore, revert

This helps with:

  • 📝 Automatic changelog generation
  • 🚀 Automated semantic versioning
  • 📊 Better project history tracking

This is a non-blocking warning - your PR can still be merged without fixing this.

Copy link

github-actions bot commented Oct 2, 2025

✅ Review Complete

⚠️ AI review completed but no review output was generated.

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]>
@bdougie
Copy link
Collaborator Author

bdougie commented Oct 2, 2025

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.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a 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.

@bdougie bdougie changed the title Add Sentry MCP error monitoring cookbook docs: Add Sentry MCP error monitoring cookbook Oct 2, 2025
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XL This PR changes 500-999 lines, ignoring generated files.
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

2 participants