Skip to Content

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

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

How it works

Every Tares source declares labels that map payload fields into the event envelope. One label is marked primary, and it names the entity the event belongs to. Sources that carry the same primary label join into one timeline per entity.

For Sentry, the pieces are:

  • Sentry posts each delivery to the ingest URL of a Tares webhook source. The payload has top-level fields such as action, installation, data and actor, and the resource is named in the Sentry-Hook-Resource header.
  • The payload is stored lossless. Your label declaration decides which field becomes the primary label.
  • If your Prometheus, log and alert sources use a service label, give the Sentry source a primary label with the same name. Events with the same value then sit on one clock with the metrics and logs. This is the same keying used in the AI SRE guide, where all sources share one service label.
  • Sentry signs its deliveries. The signature is the authentication, so the source needs no Tares API key and no Bearer header.
  • action is a top-level field, so it can be the event_type_field.

Set it up

  1. Create a webhook source in Tares (Sources → Add source → webhook), or ask a connected agent to create one. Copy the ingest URL from the source page. The webhook connector page covers the source options.
  2. In Sentry, add an integration under Settings, Developer Settings. Set its Webhook URL to the Tares ingest URL.
  3. Subscribe the integration to the resources you want, such as issues or errors. Turn on Alert Action so you can use it from alert rules.
  4. Copy the integration Client Secret into the Tares source as the signing secret.
  5. Declare the labels. Use the same label name your metrics and logs sources use, mark it primary, and point field at the payload field that carries the service name:
- name: sentry-issues 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: your_service_field, primary: true } # pick it from Fields
  1. Check the mapping. A push source’s test_source only returns the ingest endpoint, so it does not check labels. Instead, post a sample payload to the source ingest URL, or let Sentry deliver a real alert. Then open the source page and read Recent events and Fields. Fields shows which payload fields arrive and how often, so you can pick a field that is present on every alert and carries the service name.
  2. Open Explore, pick the service, and confirm the Sentry events appear next to the metrics and logs.

If the label value does not match, for example because Sentry names the service differently from your metrics, fix the field or the label name until the values line up. The label declaration also supports pattern, replace and map keys for reshaping a value.

What you get

  • Sentry issue alerts on the same per-service timeline as your metrics, logs and other alerts, merged on one clock.
  • Triggers keyed by the shared label can include the Sentry source, so an issue alert can wake an agent together with the surrounding evidence.
  • Authentication by signature, with the Client Secret as the only credential on the Tares side.
  • The full Sentry payload stored lossless, so fields you do not map are still there when you need them.
  • A Fields view that shows which payload fields arrive, so you choose the key from real deliveries.

When something else fits

  • If an alert’s payload has no field that carries the service name, a label read from another field will not join the right timeline. Pick a different field from Fields, or reshape the value with the label’s map.
  • If you want one event per alert from an Alertmanager-compatible sender, use the alertmanager connector instead. Sentry does not send that shape, so the webhook connector is the route for Sentry.

Still stuck? Get help

Last updated on