Skip to Content
Tares

How do I tie Sentry issue alerts to the right service?

Tares ties Sentry issue alerts to a service through a primary label on a webhook source. You map one field of the Sentry payload to the same label name your metrics and logs carry, such as service, and the alerts join that service’s timeline. Sentry reaches Tares through the webhook connector and a Sentry setup. Tares has no connector of its own for Sentry today.

How it works

Sentry delivers its alerts to the ingest URL of a webhook source. Tares stores the payload lossless and reads the labels you declare from it.

  • The primary label picks the entity. Mark one label primary. If it has the same name and values as the label on your metrics and logs, such as service, the Sentry alerts land on that service’s timeline in AI SRE.
  • Two ways to fill the label. Map a payload field, or set a const when a source only ever receives one service’s alerts.
  • The event type comes from action. Sentry’s payload has a top-level action field, such as created, so it works as the event_type_field. The resource itself is named in the Sentry-Hook-Resource header.
  • The signature is the credential. Sentry signs each delivery with an HMAC. The source checks it with signature_scheme hmac_sha256, the Sentry-Hook-Signature header and your integration’s Client Secret. The source needs no Tares API key.

The payload has this shape: action, an installation object with a uuid, a data object that carries the resource, and an actor with type, id and name. Fields one level deep, such as installation.uuid, can be used as labels.

Set it up

  1. In the Tares console, go to Sources → Add source → webhook. Declare a service label, or whatever name your metrics and logs use, and mark it primary. Save, then copy the ingest endpoint from the source page.
  2. Write the source so the label name matches the other sources. Replace the field value with the payload field that identifies the service in your alerts:
- name: sentry-alerts connector: webhook config: event_type_field: action signature_scheme: hmac_sha256 signature_header: Sentry-Hook-Signature signing_secret: your-client-secret labels: - { name: service, field: data.your_field, primary: true } # a one-level dotted field

If this source only receives alerts for one service, use { name: service, const: checkout, primary: true } instead, with your own service name. 3. In Sentry, add an integration under Settings, Developer Settings. Set its Webhook URL to the Tares ingest endpoint. 4. Subscribe the integration to the resources you want, such as issues or errors. Turn on Alert Action so alert rules can use it. 5. Copy the integration’s Client Secret into the source as signing_secret. The signing options are documented in the release notes, not on the webhook connector page. 6. Trigger an alert, or ask a connected agent to run test_source with a sample payload to check the label mapping first. Open the source page: Recent events shows what arrived, and Fields shows which payload fields arrive and how often. Use it to pick a field that is reliably present for the label. 7. Open Explore, pick the service, and confirm the Sentry events sit on the same timeline as its metrics and logs.

What you get

  • Sentry issue alerts appear on the same per-service timeline as your metrics, logs and deploys, merged on one clock.
  • A trigger keyed by service can watch the Sentry source together with the others, so an agent wakes with one correlated read instead of a separate Sentry lookup.
  • The action field becomes the event type, so you can tell created alerts from other actions.
  • Authentication stays with Sentry’s signature, so there is no Tares key to create, rotate or paste into Sentry.
  • The full payload stays stored, so fields you did not label are still there if you need them later.

When something else fits

  • If you do not want to depend on a payload field, a const label ties a source to one service without reading anything from the alert.
  • If a service needs all its signals in one place and Sentry is not one of them, add the other connectors listed in the webhook connector guide’s neighbors, such as Prometheus for metrics, keyed by the same label.

Still stuck? Get help

Last updated on