Trace anatomy

A trace is a tree of spans. Root span = the entry point (HTTP request). Child spans = internal operations (DB query, downstream API call). Each span has start/end time, status, attributes (HTTP method, URL, error message). Trace ID propagates via HTTP headers (W3C Trace Context standard).

Advertisement

Sampling strategy

100% sampling = too much data. Head-based: decide at trace start (e.g., sample 1% of GET, 10% of POST). Simple, predictable storage. Tail-based: collect all spans, decide after — sample errors at 100%, slow requests at 100%, others at 1%. More useful, more complex.

Advertisement

Storage

Jaeger supports Cassandra, Elasticsearch, ClickHouse backends. Retention typically 7-30 days; older traces archived or dropped. At 1B spans/day with ES, expect ~50GB/day at default sampling — plan accordingly.