Parse and Correlate Distributed Traces

Problem

Given span records (trace_id, span_id, parent_id, duration), reconstruct each trace tree and find the critical path.

Example

spans -> per-trace tree; longest-duration root-to-leaf path

Constraints

  • Spans may arrive out of order

What to look for

Build the tree from parent pointers, then compute the critical path (longest-duration root-to-leaf path).

added …
LeaderboardSalaryAccount