jaeger_compare_traces
Structurally compare two Jaeger traces by matching spans on operation and service, revealing added, removed, and changed spans with duration and tag differences.
Instructions
Compare two traces structurally — find added, removed, and changed spans.
Fetches both traces from Jaeger and performs a structural diff by matching
spans on (operationName, serviceName, parentOperation) — not span IDs,
which differ across traces. Reports duration deltas and tag differences for
changed spans.
Examples:
- Use when: "What changed between a fast and slow request?"
→ pass the trace IDs of both requests; inspect changed_spans
for duration deltas.
- Use when: "Did a deployment add new service calls?"
→ compare a pre-deploy trace with a post-deploy trace; check
added_spans for new operations.
- Use when: "Are these two traces structurally identical?"
→ if added_spans, removed_spans, and changed_spans
are all empty, the traces have the same structure.
- Don't use when: You want aggregate statistics across many traces
(use jaeger_span_statistics instead, once available).
- Don't use when: You only have one trace — use jaeger_get_trace
for single-trace inspection.
Returns:
dict with trace_id_a / trace_id_b / added_spans /
removed_spans / changed_spans (with duration + tag deltas) /
unchanged_count.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| trace_id_a | Yes | First trace ID (baseline) as a hex string (16 or 32 hex chars). Obtain from jaeger_search_traces. | |
| trace_id_b | Yes | Second trace ID (comparison) as a hex string (16 or 32 hex chars). Obtain from jaeger_search_traces. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| trace_id_a | Yes | ||
| trace_id_b | Yes | ||
| added_spans | Yes | ||
| changed_spans | Yes | ||
| removed_spans | Yes | ||
| unchanged_count | Yes |