What data does an AI SRE need to diagnose high latency?
Tares merges metrics, logs, alerts and deploy events for a service into one timeline that an AI SRE reads when you investigate high latency. The AI SRE guide builds on metrics, logs and alerts, then adds deploys and config changes as the source most worth connecting next. Every source carries the same service label, so the agent reads one correlated view instead of querying each system.
How it works
Each signal is a source in Tares, and the shared service label is what puts the sources on one timeline. For a latency symptom, the signals map like this:
- Metrics. The
prometheusconnector polls your latency series, such as p99. The demo’s metrics source carries p99, 5xx rate, DB connections and dependency health. - Logs. The
docker_logsconnector tails a container’s request logs. Theotlpconnector or a Vercel log drain also carry logs. - Alerts. The
prometheus_alertsoralertmanagerconnector ingests what your rules fire. The demo’s Prometheus has aHighLatencyrule. Prometheus keeps owning alerting, and Tares ingests what fired. - Deploys and config changes. A
webhooksource that your CD pipeline posts to on every deploy. A second webhook source withevent_type: configcovers config changes.
When the signals share a service, an alert lands next to the metric that tripped it and the logs around it. A trigger watches those sources and wakes a Tares agent, or your own agent service over a webhook. The agent starts with the correlated timeline already in front of it and writes a finding onto the timeline: what broke, since when, the likely cause tied to evidence lines, and a next action. The AI monitoring guide describes the same flow.
Set it up
- Start Tares and open the console at
http://127.0.0.1:8787.
tares up- Add a metrics source with the
prometheusconnector. Point its PromQL at your latency series and readservicefrom the metric labels. - Add a log source, either
docker_logsper container orotlpfrom your OpenTelemetry pipeline. Give it the sameservicelabel. - Add an alert source, either
prometheus_alertsoralertmanager. Keep your alerting where it is. - Add the deploy source. Create a
webhooksource with a primaryservicelabel read from the payload’sservicefield,event_type: deploy, and a text template likedeploy {commit} by {author}: {message}. Creating it gives you a stable ingest URL. 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"}'- Build a trigger over these sources keyed by
service. You can keep reacting to fired alerts, or threshold the typed fields directly, for examplemax(p99_ms) > 1000for latency. - Pick who gets woken: a Tares agent, your own agent service over a webhook, or a Slack channel.
The Build an AI SRE guide walks through the same steps against a demo system first. Its latency scenario lets you cause a latency incident on purpose.
What you get
- One timeline per service with latency metrics, request logs, alerts and deploys on one clock.
- A deploy event on the timeline, so the agent sees “deploy landed 14:02, errors started 14:04” instead of guessing at a cause.
- A finding written back to the timeline, which the next investigation starts from, yours or another agent’s.
- The same evidence through MCP, so Claude Code, Cursor or another MCP client can answer “what happened to this service in the last 15 minutes?” from the correlated read.
When the agent cannot tell, look for the gap in the sources:
- No deploy or config source. The timeline holds no change events, so the agent cannot line a latency rise up with a change. Most real root causes are a change, so this is the gap to close first.
- No alert source. A trigger that fires on an alert event, like the demo’s
incidenttrigger, has nothing to react to. Threshold a metric field in the trigger instead. - No metrics source. The agent sees alerts and logs but not the latency curve that tripped them.
- No logs source. The agent sees the numbers but not the requests behind them.
- A source without the shared
servicelabel. It stays off that service’s timeline, so the agent never sees it next to the rest.
When something else fits
- If you want to investigate by hand with no trigger, connect an MCP client with
tares mcpand ask it about the service. It reads the same timeline. - If your latency data lives in a system with no listed connector, the
http_pollconnector can poll a JSON endpoint on a schedule, and thewebhookconnector accepts arbitrary JSON, so you can bring that data in either way.