DISTRIBUTED TRACING

Rebuild one request across edge, backend, and dependencies.

Send related spans with one trace_id and label. TrafficWar groups them into a request waterfall and separates inclusive span duration from time spent in lower tiers.

A small, explicit trace contract

Tracing uses the same event ingestion path as every other TrafficWar event. No separate collector is required: add trace_id, span_kind, source, operation_type, and latency_ms to the events you already capture.

Tier-aware waterfall reconstruction

  • Client HTTP spans represent the edge-facing request.
  • Server HTTP spans represent backend execution.
  • Database, Redis, and S3 client spans represent dependencies.
  • Repeated dependency calls are retained and summarized in the journey.

Trace identity is not metric cardinality

TrafficWar uses trace_id for request reconstruction and search. It does not place trace IDs on metric aggregation keys, which keeps per-route metrics bounded independently from trace volume.