Skip to main content
Definition Website Computer and Technology

Distributed Tracing

Subject: Computer and Technology noun /dɪˈstrɪb.jə.tɪd ˈtreɪ.sɪŋ/ 1 definition

  1. Definition (noun)

    Entry #109 · Updated

    Distributed Tracing is an observability technique that tracks and reconstructs the end-to-end execution path of individual requests as they traverse multiple services, processes, and network boundaries. When a request enters a system, a unique trace identifier is assigned and propagated as context metadata across synchronous calls and asynchronous messages, enabling each component to emit timed spans that record parent-child causality, execution duration, structured attributes, and error states. Unlike aggregated metrics or isolated per-host logs, distributed tracing preserves transaction-level causal chains across distributed infrastructure so engineers can pinpoint tail-latency bottlenecks, cascading failures, and runtime service dependencies.

    Common Forms

    • Manual (SDK) Tracing: Developers explicitly call tracing library APIs (such as OpenTelemetry SDKs) in application code to start and finish spans, attach domain-specific attributes, and propagate context headers across process boundaries.

    • Automatic (Zero-Code) Tracing: Runtime agents or bytecode instrumentation hooks wrap supported web frameworks, RPC clients, and database drivers at startup to emit spans and forward trace context without source-code edits.

    • Service Mesh and Proxy Tracing: Sidecar proxies and API gateways (such as Envoy) generate ingress and egress spans at the network layer, measuring inter-service latency uniformly, provided applications forward trace headers between inbound and outbound requests.

    • Kernel-Level (eBPF) Tracing: Probes running inside the operating system kernel via Extended Berkeley Packet Filter (eBPF) hooks observe socket events and protocol payloads, capturing cross-service latency and dependency graphs across polyglot or closed-source binaries.

    Example

    When a shopper submits a checkout order, an API gateway assigns trace ID 4bf92f3577b34da6a3ce929d0e0e4736 in a W3C traceparent header and propagates it across HTTP and gRPC calls to the cart, inventory, and payment services. Viewing the assembled trace waterfall pinpoints a 1.4-second latency spike to a serialized PostgreSQL lock wait inside inventory followed by two payment timeout retries, isolating the root cause across all four services.