{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreidyogca5zpmh6fle63o2khj34z3h3yissfqxedfjaa26vjmze5tm4",
"uri": "at://did:plc:5sgu76a53rz3n6unbykmovqy/app.bsky.feed.post/3mlofios6h232"
},
"description": "Distributed tracing captures the path of a single request as it travels through multiple services, recording the timing, parent-child relationships, and metadata of each step. A trace gives operators a flame-graph view of where latency comes from and how services depend on each other.\n\n\nCore concepts\n\n * Trace. The full record of one request across all services it touches, identified by a trace_id.\n * Span. One unit of work within a trace (an HTTP call, a database query, a function execution). E",
"path": "/engineering-glossary/distributed-tracing-spans-context/",
"publishedAt": "2026-05-12T18:16:31.000Z",
"site": "https://sahilkapoor.com",
"tags": [
"Observability",
"OpenTelemetry",
"Metrics",
"Logging",
"What is API Observability? Logs, Metrics, Traces Explained"
],
"textContent": "**Distributed tracing** captures the path of a single request as it travels through multiple services, recording the timing, parent-child relationships, and metadata of each step. A trace gives operators a flame-graph view of where latency comes from and how services depend on each other.\n\n## Core concepts\n\n * **Trace.** The full record of one request across all services it touches, identified by a `trace_id`.\n * **Span.** One unit of work within a trace (an HTTP call, a database query, a function execution). Each span has a start time, end time, name, and attributes.\n * **Parent and child spans.** Spans form a tree, recording which call invoked which.\n * **Context propagation.** Trace and span IDs are passed across service boundaries in HTTP headers (W3C `traceparent`) or message metadata, so spans from different services join the same trace.\n\n\n\n## Sampling\n\nCapturing every trace at scale is expensive. Common sampling strategies:\n\n * **Head-based sampling.** Decide at the entry point whether to record this trace.\n * **Tail-based sampling.** Buffer spans and decide after the trace completes (keep all errors, slow traces, and a fraction of fast traces).\n\n\n\n## Common tools\n\n * **Open source:** Jaeger, Tempo, Zipkin, OpenTelemetry Collector\n * **Commercial:** Datadog APM, Honeycomb, New Relic, Lightstep (ServiceNow), Splunk APM\n\n\n\nš\n\n**Related Terms**\nObservability, OpenTelemetry, Metrics, Logging\n\nš\n\n**Further Reading**\nWhat is API Observability? Logs, Metrics, Traces Explained",
"title": "Distributed Tracing",
"updatedAt": "2026-05-13T19:11:25.058Z"
}