Sentry
Receive Sentry error alerts as signals in Loop.
Sentry Integration
The Sentry integration receives webhook alerts for errors and exceptions, creating signals in Loop with severity derived from the error level and event count.
Endpoint
POST /api/signals/sentryAuthentication
Sentry signs webhook deliveries with HMAC-SHA256. Loop verifies this signature before processing.
- Header:
Sentry-Hook-Signature - Format: Raw hex digest (no prefix)
- Algorithm: HMAC-SHA256 of the canonicalized JSON body using
SENTRY_CLIENT_SECRET - Canonicalization: The request body is parsed as JSON and re-serialized with
JSON.stringifyto produce a canonical form before computing the HMAC - Comparison: Timing-safe (
crypto.timingSafeEqual)
If the header is missing or the signature does not match, Loop responds with 401.
Severity Mapping
Loop derives severity from the Sentry error level and event count:
| Condition | Severity |
|---|---|
Level is fatal | critical |
Level is error and count >= 100 | critical |
Level is error | high |
Level is warning | medium |
| All other levels | low |
What Gets Created
Each webhook delivery creates:
- A signal record with
source: "sentry", the action type (e.g.,event), severity, and full payload. - A linked issue with type
signal, statustriage, and a title likeSentry: TypeError: undefined is not a function (523 events).
The signal's sourceId is set to the Sentry issue ID when available.
Setup
Locate your Sentry client secret
In Sentry, go to Settings > Developer Settings > Your Internal Integration (or create a new one). The Client Secret is displayed on the integration's credentials page.
Alternatively, for webhook-based integrations under Settings > Integrations > Webhooks, Sentry provides a signing secret.
Set the environment variable
Add the client secret to your Loop API environment:
SENTRY_CLIENT_SECRET=your_sentry_client_secret_hereThis variable must be available to the Loop API process at runtime.
Configure the webhook in Sentry
- Go to Settings > Developer Settings and create or edit an internal integration.
- Set the Webhook URL to your Loop endpoint:
https://your-loop-api.example.com/api/signals/sentry - Under Webhooks, enable the event types you want to receive (e.g.,
issue,error,event_alert). - Save the integration.
Verify the connection
Trigger a test alert in Sentry or wait for a real error to occur. Check your Loop instance for a new signal with source sentry. Verify the issue was created with the correct severity based on the error level and event count.
Example Payload
Loop reads the following fields from the Sentry webhook payload:
data.issue.titleordata.error.title-- used in the issue titledata.issue.countordata.error.count-- used for severity calculationdata.issue.levelordata.error.level-- used for severity calculationdata.issue.id-- used as the signal'ssourceIdaction-- used as the signal's event type (defaults toevent)