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 or resolved.
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 when new Sentry issues appear |
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:
- Token: Your Sentry auth token
- Sentry Hostname: Your Sentry instance hostname (e.g.,
mycompany.sentry.iofor Cloud, orsentry.mycompany.netfor self-hosted)
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 via webhooks when new issues are created or resolved. Alerts flow through the standard alert pipeline — they appear in the Alerts tab, get grouped by Alertmanager, and can trigger on-call pages and AI investigations when configured.
- 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, check Issue
- Copy the Client Secret from the Credentials section at the bottom
- Click Save Changes
Back in Autoheal, paste the Client Secret in the Webhook Signing Secret field. This is used to verify webhook signatures (HMAC-SHA256).
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 checkbox is enabled in the Internal Integration's Webhooks section
- Only
issue.createdandissue.resolvedactions trigger the alert pipeline; other actions (assigned, ignored, archived) and other resource types (error, comment, seer) are filtered out automatically - Check the webhook events log in Autoheal for signature verification errors