Skill v1.0.1
currentAutomated scan100/100+3 new
name: error-root-cause description: >- Walk a failed trace to the first originating error span and distinguish root cause from cascading failures. Use when a trace has errors and the user asks why it failed, what caused the errors, or which service is the root cause. license: Apache-2.0 metadata: author: jaegertracing version: "1.0" allowed-tools: get_trace_errors get_trace_topology get_span_details find_traces
Error Root Cause Analysis
When this applies
A trace contains one or more error spans and the user wants to know the originating failure, not just the symptoms.
Procedure
- Use
get_trace_errorsto list all error spans with their status messages. - Use
get_trace_topologyto see the full span tree and identify
parent-child relationships among the error spans.
- Walk from each error span toward the leaves of the tree. The deepest error
span with no errored children is the candidate root cause.
- Before accepting that candidate, look at its children even though none of
them errored. If one ran for nearly the whole of the candidate's duration, the candidate did not fail — it gave up waiting, and the cause lies in that child. Descend into it and repeat, until no child accounts for the time.
- Use
get_span_detailson the span you settled on to inspect attributes,
events, and status for the actual failure reason.
- Report: the span the failure originates from (service, operation, and error
message if it has one), the propagation chain, and a recommendation.
Gotchas
- A timed-out call often has nothing below it. The work it was waiting on never
returned, so no spans were recorded for it. Name the last span you can see and say the cause lies beneath it, rather than blaming the timeout itself.
- The span a trace blames and the span that failed are frequently in different
services. Report where the failure originates, not where it surfaced.
- Multiple independent root causes can exist in a single trace.
- A client span that failed to connect (connection refused, unavailable) and
has no server-side child is not the origin: the callee was down or restarting. Use find_traces on the callee for the period before the failure and get_span_details on its own spans to find why it went down, such as spans getting slower or attribute values that stand out.