AIOps: AI for IT Operations · Module 04
Correlation and Root Cause Analysis
From many symptoms to one cause: a dependency graph from traces, correlating incidents with deploys and canaries, ranking root causes on the graph, and the service context the analysis can trust.
Học xong bạn làm được
- Build a service dependency graph from traces
- Correlate an incident with recent changes and canary results
- Rank root-cause candidates on the dependency graph
- Keep service context in catalog files and check it against what traces show
Bài học
- Service dependency graphs
Traces already contain who calls whom. Tempo's metrics-generator and the OpenTelemetry Collector's servicegraph connector pair client and server spans into edges and emit metrics such as traces_service_graph_request_total{client, server}. The resulting graph tells you which way problems travel - a failure spreads upstream to the callers, so the deepest unhealthy service is the first suspect.
- Correlating with changes
Many incidents follow a change - a deploy, a feature flag, a config edit. A change log that records what changed, where, when and by whom turns "what changed?" into a query, and an as-of join ranks the changes before a symptom. Canary analysis prevents the incident instead - compare a new version's error rate and latency with the old one's on the same traffic before rolling it out.
- Ranking root causes on the graph
With dozens of services, finding "the unhealthy service with nothing unhealthy below it" becomes a ranking problem. Combine the dependency graph with how anomalous each service is - propagation rules that blame the deepest anomalous service, or a PageRank-style random walk along the call direction, weighted by anomaly scores. Score a method on labelled incidents with top-1 and top-3 accuracy; RCAEval offers hundreds of real cases to test on.
- Service context
A root cause is only useful with context - who owns the service, how critical it is, what it is supposed to depend on, where its runbook lives. Backstage's catalog-info.yaml files hold that context next to the code, Python reads them with a YAML parser, and comparing the declared dependencies with the graph observed in traces finds drift that would mislead both people and AI.