Skip to main content

Sentry Integration

Connect Sentry to enable agents 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, agents can:

CapabilityDescription
View IssuesBrowse and search error issues
Analyze EventsExamine individual error events and stack traces
Check ReleasesReview release health and regressions
Performance DataAccess transaction performance metrics
Webhook TriggersAutomatically start investigations when new Sentry issues appear
note

Write tools on this integration (add comments to issues) are available only to agents granted write access to it. A governance policy on write operations pauses each write for a person to approve. Every call is recorded in the Audit Trail.

Prerequisites​

  • A Sentry account (Cloud or self-hosted)
  • An Auth Token with appropriate scopes
  • Read access to the projects you want to monitor

Setup​

1
Create an Auth Token
  1. Log in to Sentry
  2. Go to Settings → Auth Tokens
  3. Click Create New Token
  4. Select the required scopes (see below)
  5. Copy the generated token
2
Add Integration in Autoheal
  1. Go to Integrations in Autoheal
  2. Click Sentry
  3. Enter a name (e.g., "Production Sentry")
3
Configure Credentials

Enter the following:

  • Token: Your Sentry auth token
  • Sentry Hostname: Your Sentry instance hostname (e.g., mycompany.sentry.io for Cloud, or sentry.mycompany.net for self-hosted)
4
Test and Save

Click Test Connection to check the connection. Then click Save.

Required Scopes​

Create your auth token with these scopes:

ScopeWhy It's Needed
project:readList and access projects
event:readView error events
issue:readBrowse issues
org:readAccess 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 and are grouped by Alertmanager. When configured, they can trigger on-call pages and AI investigations.

1
Enable Webhook in Autoheal
  1. Go to your Sentry integration settings in Integrations
  2. Click the Webhook tab
  3. Toggle Enable Webhook. Then copy the generated webhook URL
2
Create Internal Integration in Sentry
  1. In Sentry, go to Settings → Developer Settings → Custom Integrations
  2. Click Create New Integration. Then select Internal Integration
  3. Under Webhooks, paste the webhook URL from Autoheal
  4. Under event types, check Issue
  5. Copy the Client Secret from the Credentials section at the bottom
  6. Click Save Changes
3
Configure Webhook Signing Secret

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 an 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
  • Check that the auth token is correct
  • Check that the token hasn't been revoked
  • Check that the token has the required scopes
Organization Not Found
  • Check that the organization slug is correct
  • Check for typos (slugs are case-sensitive)
  • Check that your token has access to the organization
No Issues Found
  • Check that the token has issue:read scope
  • Check that there are issues in the specified time range
  • Check that project access permissions are correct
Webhook Not Triggering Investigations
  • Check that 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
  • Check that the Issue checkbox is enabled in the Internal Integration's Webhooks section
  • Only issue.created and issue.resolved actions trigger the alert pipeline. Other actions (assigned, ignored, archived) and other resource types (error, comment, seer) are discarded automatically
  • Check the webhook events log in Autoheal for signature verification errors