Which OpenTelemetry log records does an AI SRE search when alerts from Prometheus fire?
Tares gives an AI SRE the OpenTelemetry log records of the service that the Prometheus alert is about, not every log you ingest. Both signals carry the same service label, so they merge into one correlated timeline per service. When an alert fires, the agent reads that service’s timeline, with the alert event sitting next to the logs.
How it works
The narrowing comes from one shared label, not from a search query you write.
- OTLP logs get a service label. The OpenTelemetry connector receives OTLP/HTTP logs, traces and metrics. Resource attributes such as
service.namebecome labels, so theservicelabel identifies which service each log record came from. One source ingests every service, with no per-service setup. - Alerts get the same label. The Prometheus alerts connector polls Prometheus’s own alerts and creates one event per active alert, plus a
resolvedevent when it clears. Each alert becomes an event withevent_typeset to the alert name,textset to its summary, and its labels as Tares labels plus astateoffiring,pendingorresolved. - One timeline per service. Because both sources carry
service, metrics, logs and alerts forapi-serverare merged on one clock. This single read is what the agent works from, so a log record from another service is not part of it. - The trigger is per service. In the AI SRE guide, the trigger watches the sources keyed by
serviceand fires when an alert event arrives, counted per service. The agent it wakes reads that service’s correlated timeline and writes a finding back onto it.
Prometheus keeps owning alerting. Tares ingests what fired, correlates it with the evidence and wakes the agent. Nothing is re-thresholded.
Set it up
-
Start Tares and open the console.
tares up -
Add an OTLP source keyed by service. There is no required config, and the
servicelabel, read fromservice.name, is the natural key.- name: otel connector: otlp config: labels: - { name: service, field: service, primary: true } -
Point your exporter, an instrumented app or an OpenTelemetry Collector, at the daemon.
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:8787 # OTLP/HTTP → /v1/{logs,traces,metrics} # or gRPC (otlp-grpc extra): OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317The sender uses a Bearer Authorization header holding an ingest-scoped API key, needed only when Tares has auth on.
-
Add a Prometheus alerts source. Enter the Prometheus URL, run Discover, and optionally filter by severity.
- name: alerts connector: prometheus_alerts poll: 30s config: url: http://localhost:9090 severities: critical,warning # blank = all labels: - { name: severity, field: labels.severity, primary: true } - { name: state, field: state } -
Promote
serviceon the alerts. Discover only proposes the labels that are always present,severityandstate. An alert’s own labels, such asnamespaceandservice, exist only while it is firing. Once real alerts have been ingested, open the source’s Fields tab and addserviceas a label, so alerts and logs share the key. -
Check the result. In the OTLP source, Recent events shows log records as they arrive and Explore lists services under the
servicekey. In the alerts source, Fields shows the labels your alerts carry. -
To investigate interactively, start the MCP endpoint in a second shell and connect your client.
tares mcpThen ask, for example, “what happened to api-server in the last 15 minutes?” The client reads the correlated timeline for that service and answers from it.
To put a cheap first-level agent in front of the alert-driven one, see Watch, then escalate.
What you get
- Focused evidence. The agent starts from the logs of the alerting service, next to the alert and the metric that tripped it, instead of a search across everything you ingest.
- One setup for every service. A single OTLP source covers all services, because resource attributes become labels.
- Alerts without a second threshold. Each alert fires once, re-emitting only on a state change, and a
resolvedevent lands on the timeline when it clears. - Findings that persist. The agent writes its conclusion onto the same service’s timeline, so the next investigation, yours or an agent’s, starts from it.
When something else fits
- If your alerts come through Alertmanager rather than from Prometheus directly, use the
alertmanagerconnector. Keep the sameservicelabel so the timeline still joins up. - If your logs come from containers rather than an OpenTelemetry pipeline, the
docker_logsconnector can feed the same per-service timeline. Either way the key must match across sources, or the logs will not appear next to the alert.