What should an AI SRE read next to Datadog monitors for slow database queries?
Tares lets an AI SRE read the same service’s metrics, logs and recent deploys beside a Datadog monitor alert, so the diagnosis cites evidence. Datadog reaches Tares through the webhook connector and a vendor setup, because Tares has no connector of its own for Datadog today. Every source carries the same service label, so the alert, the database metrics, the logs and the latest change merge into one timeline per service.
How it works
A slow-query monitor tells you that something is wrong. The cause is usually elsewhere on the same service, so the agent needs four kinds of evidence on one clock:
- The Datadog alert. Datadog posts the monitor event to a Tares
webhooksource. You write the JSON payload in Datadog’s webhook Payload field from Datadog variables such as $ALERT_ID, $EVENT_MSG and $LINK, so the shape is yours. - Metrics for the same service. Database connections, latency and error rate, for example from a
prometheussource. - Logs for the same service. Request and error lines, from a
docker_logssource or from OTLP. - Recent changes. Deploys and config changes, posted by your CD pipeline to a second
webhooksource.
Each source declares a primary service label. Tares correlates everything that carries the same value into one timeline. A trigger over these sources, keyed by service, can wake your agent. The agent reads the correlated timeline, ties the slowdown to specific lines, and writes its finding back so the next investigation starts from it. The AI SRE guide builds this loop end to end.
Keep the Datadog payload flat. event_type_field and text_template read top-level fields only.
Set it up
- Create the Datadog source in Sources → Add source → webhook, or paste this object. It declares
serviceas the primary label, so the alert lands on the same timeline as your other sources:
- name: datadog-monitors
connector: webhook
config:
event_type: datadog_monitor
labels:
- { name: service, field: service, primary: true }- Copy the ingest endpoint from the source page. It has the form
/ingest/followed by the ingest key. - In Datadog, open the Webhooks integration and add a webhook whose URL is that Tares ingest URL.
- In the webhook Payload field, write flat JSON from Datadog variables. Include a top-level
servicefield that carries the monitored service’s name, so the label above can read it. - When Tares has auth on, add custom headers as JSON with an Authorization Bearer header that holds an ingest-scoped API key. On an instance without auth you do not need it.
- Put @webhook- followed by your webhook’s name in the monitor message, so the monitor calls the webhook.
- Add the evidence beside it. Create a metrics source for the database signals and a logs source for the service. Give both the same
servicelabel, so they join the Datadog events on one timeline. - Add recent changes. Create a second
webhooksource with a primaryservicelabel,event_type: deployand a text template such asdeploy {commit} by {author}: {message}. Then add one line to your CD pipeline, run on every deploy:
curl -X POST https://<your-tares>/ingest/<ingest_key> \
-H 'content-type: application/json' \
-d '{"service": "checkout", "commit": "9f2c81d", "author": "dana", "message": "raise db pool size"}'- Check the result. Open Recent events on each source, and use Fields to confirm that
servicearrives on every event. See the webhook connector page for the full source options.
What you get
- One timeline per service, with the Datadog monitor event, the database metrics, the logs and the latest deploy on the same clock.
- A diagnosis that cites evidence. The agent can say that connections climbed, that the slow-query alert fired two minutes after a deploy, and which log lines show it.
- Datadog keeps owning alerting. Tares ingests what fired, correlates it, and handles the waking. Nothing is re-thresholded.
- A finding written back to the service’s timeline, so the next investigation, yours or an agent’s, starts from the previous conclusion.
- The same evidence is open to you through a connected MCP client, so you can ask what happened to the service in the last 15 minutes and get the correlated read.
When something else fits
- If you only need the monitor’s text forwarded to a channel, Datadog’s own notifications are enough. Tares pays off when the agent must read metrics, logs and changes beside the alert.
- If the alert is the only signal you can send, the timeline holds just that event until you add the metrics, logs and deploy sources keyed by the same
servicelabel.