Skip to content

Commit 143d76e

Browse files
Add Sentry integration documentation
- Add comprehensive Sentry integration docs with setup guide - Include technical implementation details and MCP architecture - Document OAuth scopes and security considerations - Add troubleshooting section and example usage - Update docs.json navigation to include Sentry integration
1 parent d31e69a commit 143d76e

3 files changed

Lines changed: 196 additions & 22 deletions

File tree

docs/docs.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"integrations/slack",
3636
"integrations/linear",
3737
"integrations/jira",
38+
"integrations/sentry",
3839
"integrations/notion",
3940
"integrations/figma",
4041
"integrations/circleci",

docs/integrations/sentry.mdx

Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
---
2+
title: "Sentry Integration"
3+
sidebarTitle: "Sentry"
4+
icon: "sentry"
5+
---
6+
7+
import { COMMUNITY_SLACK_URL } from "/snippets/links.mdx";
8+
9+
Integrate Codegen with your Sentry workspace to allow agents to analyze errors, manage issues, and provide intelligent debugging assistance.
10+
11+
{/* TODO: Add Sentry integration screenshot */}
12+
<img src="/images/codegen-thumbnail.png" className="rounded-lg" />
13+
14+
<Note>
15+
The Sentry integration is currently in <b>beta</b>. Please reach out in the <a href={COMMUNITY_SLACK_URL}>community</a> to have it enabled for your Codegen account.
16+
</Note>
17+
18+
## Overview
19+
20+
The Sentry integration enables Codegen agents to:
21+
- **Analyze Production Errors:** Get detailed insights into errors and exceptions happening in your applications
22+
- **Root Cause Analysis:** Use AI-powered analysis to understand why errors are occurring
23+
- **Issue Management:** Update issue status, assign issues, and add comments
24+
- **Project Management:** Create and manage Sentry projects and teams
25+
- **Release Tracking:** Monitor releases and their associated issues
26+
27+
## Step-by-Step Setup Guide
28+
29+
Follow these steps to successfully connect Codegen to your Sentry workspace:
30+
31+
### 1. Enable Sentry Integration for Your Organization
32+
33+
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.
34+
35+
### 2. Connect Your Sentry Account
36+
37+
- Go to [Codegen's Sentry Integration page](https://codegen.com/integrations/sentry).
38+
- Click **Connect Sentry Workspace** and complete the OAuth flow.
39+
- Grant the necessary permissions for Codegen to access your Sentry data.
40+
41+
<Warning>
42+
Make sure you have the appropriate permissions in your Sentry organization to authorize third-party applications.
43+
</Warning>
44+
45+
### 3. Configure Permissions
46+
47+
The Sentry integration requires the following OAuth scopes:
48+
- `org:read` - Read organization information
49+
- `project:write` - Create and manage projects
50+
- `team:write` - Create and manage teams
51+
- `event:write` - Access error events and issues
52+
53+
### 4. Start Using Codegen with Sentry
54+
55+
Once connected, you can:
56+
- Ask Codegen to analyze specific Sentry issues by providing issue URLs
57+
- Request error analysis and debugging suggestions
58+
- Have Codegen manage issue status and assignments
59+
- Get insights into error patterns and trends
60+
61+
## Capabilities
62+
63+
The Sentry integration provides comprehensive access to your Sentry workspace:
64+
65+
### Error Analysis & Debugging
66+
- **Issue Details:** Fetch comprehensive information about specific errors and exceptions
67+
- **Stacktrace Analysis:** Get detailed stacktraces and error context
68+
- **Root Cause Analysis:** AI-powered analysis to identify the underlying causes of issues
69+
- **Error Patterns:** Identify recurring issues and patterns across your applications
70+
71+
### Issue Management
72+
- **Status Updates:** Change issue status (resolved, ignored, unresolved)
73+
- **Assignment:** Assign issues to team members or teams
74+
- **Comments:** Add comments and updates to issues
75+
- **Bulk Operations:** Manage multiple issues efficiently
76+
77+
### Project & Team Management
78+
- **Project Creation:** Create new Sentry projects for your applications
79+
- **Team Management:** Create and manage teams within your organization
80+
- **DSN Management:** Create and manage Data Source Names (DSNs) for your projects
81+
82+
### Monitoring & Insights
83+
- **Release Tracking:** Monitor releases and their associated issues
84+
- **Error Trends:** Analyze error frequency and patterns over time
85+
- **Performance Insights:** Get insights into application performance issues
86+
87+
## How Agents Use Sentry
88+
89+
Agents leverage the Sentry integration to provide intelligent debugging assistance:
90+
91+
### Error Investigation
92+
```
93+
Human: "Can you analyze this Sentry issue: https://my-org.sentry.io/issues/PROJECT-123"
94+
95+
Agent: I'll analyze that Sentry issue for you. Let me fetch the details and provide insights...
96+
```
97+
98+
### Proactive Issue Management
99+
- **Automatic Triage:** Agents can automatically categorize and prioritize issues
100+
- **Status Updates:** Keep issue status current based on code changes and fixes
101+
- **Team Notifications:** Notify relevant team members about critical issues
102+
103+
### Code-Error Correlation
104+
- **Link PRs to Issues:** Connect GitHub pull requests to related Sentry issues
105+
- **Fix Validation:** Verify that code changes resolve reported issues
106+
- **Regression Detection:** Identify when new code introduces previously resolved issues
107+
108+
## Technical Implementation
109+
110+
The Sentry integration is built using:
111+
112+
### Model Context Protocol (MCP)
113+
- **Secure Communication:** Uses MCP for secure, standardized communication with Sentry
114+
- **Real-time Access:** Direct connection to Sentry's API through MCP server
115+
- **OAuth Authentication:** Secure token-based authentication with automatic refresh
116+
117+
### Backend Architecture
118+
- **Token Management:** Automatic OAuth token refresh and management
119+
- **Feature Flags:** Organization-level feature flag control
120+
- **Error Handling:** Robust error handling and timeout management
121+
122+
### Available Tools
123+
When the integration is enabled, agents have access to Sentry-specific tools:
124+
- `sentry_whoami` - Get current user information
125+
- `sentry_find_organizations` - List accessible organizations
126+
- `sentry_find_projects` - List projects in an organization
127+
- `sentry_find_issues` - Search for issues with advanced filtering
128+
- `sentry_get_issue_details` - Get comprehensive issue information
129+
- `sentry_update_issue` - Update issue status and assignments
130+
- `sentry_analyze_issue_with_seer` - AI-powered root cause analysis
131+
132+
## Best Practices
133+
134+
### For Development Teams
135+
1. **Consistent Naming:** Use clear, descriptive names for projects and teams
136+
2. **Regular Monitoring:** Set up agents to regularly check for new critical issues
137+
3. **Integration Workflow:** Incorporate Sentry analysis into your PR review process
138+
139+
### For Issue Management
140+
1. **Automated Triage:** Let agents handle initial issue categorization
141+
2. **Status Tracking:** Keep issue status updated as fixes are deployed
142+
3. **Documentation:** Use agent-generated analysis to document complex issues
143+
144+
### Security Considerations
145+
1. **Token Security:** OAuth tokens are securely managed and automatically refreshed
146+
2. **Scope Limitation:** Only request necessary permissions for your use case
147+
3. **Access Control:** Use Sentry's built-in access controls to limit data exposure
148+
149+
## Troubleshooting
150+
151+
### Common Issues
152+
153+
**Integration Not Available**
154+
- Ensure the Sentry MCP integration is enabled for your organization
155+
- Contact support if you don't see the integration option
156+
157+
**Authentication Errors**
158+
- Check that your OAuth token hasn't expired
159+
- Verify you have the necessary permissions in your Sentry organization
160+
- Try disconnecting and reconnecting the integration
161+
162+
**Timeout Issues**
163+
- The integration has built-in timeout handling for API calls
164+
- Large organizations may experience longer response times
165+
166+
### Getting Help
167+
168+
If you encounter issues with the Sentry integration:
169+
1. Check the [troubleshooting guide](/troubleshooting)
170+
2. Join our <a href={COMMUNITY_SLACK_URL}>community Slack</a> for support
171+
3. Contact the Codegen team for organization-specific issues
172+
173+
## Example Usage
174+
175+
Here are some common ways to use the Sentry integration:
176+
177+
### Analyzing a Specific Issue
178+
```
179+
@codegen Can you analyze this Sentry issue and suggest a fix?
180+
https://my-org.sentry.io/issues/PROJECT-123
181+
```
182+
183+
### Bulk Issue Management
184+
```
185+
@codegen Please review all unresolved issues in the backend project
186+
and prioritize them by frequency and impact
187+
```
188+
189+
### Release Monitoring
190+
```
191+
@codegen Check if the latest release introduced any new errors
192+
and create GitHub issues for any critical problems
193+
```
194+
195+
The Sentry integration makes error monitoring and debugging more efficient by providing AI-powered analysis and automated issue management capabilities.

uv.lock

Lines changed: 0 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)