Sentry Integration
Connect Sentry to enable the AI agent to analyze errors, exceptions, and performance issues during investigations. Sentry can also be configured as an alert source to automatically trigger investigations when new issues are created.
Capabilities
Once connected, the AI agent can:
| Capability | Description |
|---|---|
| View Issues | Browse and search error issues |
| Analyze Events | Examine individual error events and stack traces |
| Check Releases | Review release health and regressions |
| Performance Data | Access transaction performance metrics |
| Webhook Triggers | Automatically start investigations from new Sentry issues |
Prerequisites
- A Sentry account (Cloud or self-hosted)
- An Auth Token with appropriate scopes
- Read access to the projects you want to monitor
Setup
- Log in to Sentry
- Go to Settings → Auth Tokens
- Click Create New Token
- Select the required scopes (see below)
- Copy the generated token
- Go to Integrations in Autoheal
- Click Sentry
- Enter a name (e.g., "Production Sentry")
Enter the following:
- Auth Token: Your Sentry auth token
- Organization Slug: Your Sentry organization name
- URL (optional): For self-hosted Sentry instances
Click Test Connection to verify, then Save.
Required Scopes
Create your auth token with these scopes:
| Scope | Why It's Needed |
|---|---|
project:read | List and access projects |
event:read | View error events |
issue:read | Browse issues |
org:read | Access organization data |
Webhook Setup (Alert Source)
Sentry can automatically trigger investigations when new issues occur via webhooks. Only issue-type events (issue.created) will trigger investigations — other webhook events are filtered out automatically.
- Go to your Sentry integration settings in Integrations
- Click the Webhook tab
- Toggle Enable Webhook and copy the generated webhook URL
- In Sentry, go to Settings → Developer Settings → Custom Integrations
- Click Create New Integration and select Internal Integration
- Under Webhooks, paste the webhook URL from Autoheal
- Under event types, enable Issue (this is the only event type that triggers investigations)
- Copy the Client Secret from the integration page
Back in Autoheal, paste the Client Secret in the Webhook Signing Secret field. This is used to verify webhook signatures (HMAC-SHA256).
To automatically trigger investigations when new issues are created:
- In Sentry, go to Alerts → Create Alert Rule
- Select Issue Alert as the alert type
- Configure conditions for when alerts should fire
- Under Actions, select your Internal Integration
- Save the alert rule
Example Queries
Once connected, you can ask the AI agent:
What are the most frequent errors in the payment service?
Show me the stack trace for the latest NullPointerException
Were there any new errors after yesterday's deployment?
What's the error rate trend for the checkout flow?
Troubleshooting
401 Unauthorized
- Verify the auth token is correct
- Check that the token hasn't been revoked
- Ensure the token has the required scopes
Organization Not Found
- Verify the organization slug is correct
- Check for typos (slugs are case-sensitive)
- Ensure your token has access to the organization
No Issues Found
- Verify the token has
issue:readscope - Check that there are issues in the specified time range
- Ensure project access permissions are correct
Webhook Not Triggering Investigations
- Verify the webhook URL is correctly configured in Sentry's Internal Integration (Settings → Developer Settings → Custom Integrations)
- Check that the Webhook Signing Secret matches the Client Secret from Sentry
- Ensure the Issue event type is enabled in the webhook subscriptions — this is the only type that triggers investigations
- Event alerts, metric alerts, error, comment, and installation events are all filtered out
- Check the webhook events log in Autoheal for signature verification errors