Skip to content

Trace Comparison

Trace Comparison lets you diff any two agent runs side-by-side — useful for A/B testing prompts, debugging regressions, and measuring cost/latency improvements.

  1. Go to the Traces list in the dashboard
  2. Select the checkbox on two traces
  3. Click Compare — or navigate to #/traces/compare?a=<id>&b=<id>

Both traces are rendered as parallel span trees. Matching spans (by name) are aligned and color-coded:

ColorMeaning
GreenSpan exists in both, similar duration
YellowSpan exists in both, significantly different duration
RedSpan only in one trace (added or removed)

At the top, a summary panel shows aggregate differences:

MetricTrace ATrace BDelta
Total duration4.2s3.1s-26%
Total cost$0.0042$0.0031-26%
Span count86-2
Error spans01+1

Click any matched span pair to open a detail panel showing input/output diffs between the two runs.

  • Prompt optimization — compare token usage and output quality before/after prompt changes
  • Regression detection — verify a code change didn’t add unexpected tool calls or latency
  • Cost analysis — measure actual savings from switching models or batching calls
  • Debugging — find which span diverged when one run succeeded and another failed