| title | Sentry Integration |
|---|---|
| sidebarTitle | Sentry |
| icon | sentry |
import { COMMUNITY_SLACK_URL } from "/snippets/links.mdx";
Integrate Codegen with your Sentry workspace to allow agents to analyze errors, manage issues, and provide intelligent debugging assistance.
{/* TODO: Add Sentry integration screenshot */}
![]()
The Sentry integration enables Codegen agents to:
- Analyze Production Errors: Get detailed insights into errors and exceptions happening in your applications
- Root Cause Analysis: Use AI-powered analysis to understand why errors are occurring
- Issue Management: Update issue status, assign issues, and add comments
- Project Management: Create and manage Sentry projects and teams
- Release Tracking: Monitor releases and their associated issues
Follow these steps to successfully connect Codegen to your Sentry workspace:
The Sentry integration uses the Model Context Protocol (MCP) to provide secure access to your Sentry data. Contact the Codegen team to enable this feature for your organization.
- Go to Codegen's Sentry Integration page.
- Click Connect Sentry Workspace and complete the OAuth flow.
- Grant the necessary permissions for Codegen to access your Sentry data.
The Sentry integration requires the following OAuth scopes:
org:read- Read organization informationproject:write- Create and manage projectsteam:write- Create and manage teamsevent:write- Access error events and issues
Once connected, you can:
- Ask Codegen to analyze specific Sentry issues by providing issue URLs
- Request error analysis and debugging suggestions
- Have Codegen manage issue status and assignments
- Get insights into error patterns and trends
The Sentry integration provides comprehensive access to your Sentry workspace:
- Issue Details: Fetch comprehensive information about specific errors and exceptions
- Stacktrace Analysis: Get detailed stacktraces and error context
- Root Cause Analysis: AI-powered analysis to identify the underlying causes of issues
- Error Patterns: Identify recurring issues and patterns across your applications
- Status Updates: Change issue status (resolved, ignored, unresolved)
- Assignment: Assign issues to team members or teams
- Comments: Add comments and updates to issues
- Bulk Operations: Manage multiple issues efficiently
- Project Creation: Create new Sentry projects for your applications
- Team Management: Create and manage teams within your organization
- DSN Management: Create and manage Data Source Names (DSNs) for your projects
- Release Tracking: Monitor releases and their associated issues
- Error Trends: Analyze error frequency and patterns over time
- Performance Insights: Get insights into application performance issues
Agents leverage the Sentry integration to provide intelligent debugging assistance:
Human: "Can you analyze this Sentry issue: https://my-org.sentry.io/issues/PROJECT-123"
Agent: I'll analyze that Sentry issue for you. Let me fetch the details and provide insights...
- Automatic Triage: Agents can automatically categorize and prioritize issues
- Status Updates: Keep issue status current based on code changes and fixes
- Team Notifications: Notify relevant team members about critical issues
- Link PRs to Issues: Connect GitHub pull requests to related Sentry issues
- Fix Validation: Verify that code changes resolve reported issues
- Regression Detection: Identify when new code introduces previously resolved issues
The Sentry integration is built using:
- Secure Communication: Uses MCP for secure, standardized communication with Sentry
- Real-time Access: Direct connection to Sentry's API through MCP server
- OAuth Authentication: Secure token-based authentication with automatic refresh
- Token Management: Automatic OAuth token refresh and management
- Feature Flags: Organization-level feature flag control
- Error Handling: Robust error handling and timeout management
When the integration is enabled, agents have access to Sentry-specific tools:
sentry_whoami- Get current user informationsentry_find_organizations- List accessible organizationssentry_find_projects- List projects in an organizationsentry_find_issues- Search for issues with advanced filteringsentry_get_issue_details- Get comprehensive issue informationsentry_update_issue- Update issue status and assignmentssentry_analyze_issue_with_seer- AI-powered root cause analysis
- Consistent Naming: Use clear, descriptive names for projects and teams
- Regular Monitoring: Set up agents to regularly check for new critical issues
- Integration Workflow: Incorporate Sentry analysis into your PR review process
- Automated Triage: Let agents handle initial issue categorization
- Status Tracking: Keep issue status updated as fixes are deployed
- Documentation: Use agent-generated analysis to document complex issues
- Token Security: OAuth tokens are securely managed and automatically refreshed
- Scope Limitation: Only request necessary permissions for your use case
- Access Control: Use Sentry's built-in access controls to limit data exposure
Integration Not Available
- Ensure the Sentry MCP integration is enabled for your organization
- Contact support if you don't see the integration option
Authentication Errors
- Check that your OAuth token hasn't expired
- Verify you have the necessary permissions in your Sentry organization
- Try disconnecting and reconnecting the integration
Timeout Issues
- The integration has built-in timeout handling for API calls
- Large organizations may experience longer response times
If you encounter issues with the Sentry integration:
- Check the troubleshooting guide
- Join our community Slack for support
- Contact the Codegen team for organization-specific issues
Here are some common ways to use the Sentry integration:
@codegen Can you analyze this Sentry issue and suggest a fix?
https://my-org.sentry.io/issues/PROJECT-123
@codegen Please review all unresolved issues in the backend project
and prioritize them by frequency and impact
@codegen Check if the latest release introduced any new errors
and create GitHub issues for any critical problems
The Sentry integration makes error monitoring and debugging more efficient by providing AI-powered analysis and automated issue management capabilities.