distributed tracing
Following one request across every service, queue and database it touches by recording linked spans that share a trace identifier.
In more detail
It shows where time was spent and where a failure started in a system of many services. It depends on every hop propagating the trace context, including gateways and message queues.
Related terms
- trace — A record of one request’s whole journey through a system, made of nested spans that show where the time went.
- span — One timed operation within a trace, such as handling a request or running a query, with its start, duration and attributes.
- Trace Context — The standard way of passing a trace identifier and parent span identifier from one service to the next, usually in the traceparent header.
- trace ID — An identifier shared by every span and log line belonging to one request, so they can be found together.
- traceparent — The HTTP header defined by Trace Context that carries the trace identifier, parent span identifier and sampling flag between services.
- OpenTelemetry — A vendor-neutral, open-source standard and set of tools for producing traces, metrics and logs and sending them to any backend.
- correlation ID — A unique value attached to one request and passed along everywhere it goes, so its logs and traces can be found together.
- observability — How well you can understand what a system is doing, and why, from the data it emits: mainly logs, metrics and traces.
- metric — A number measured over time, such as requests per second or error count, that shows how a system behaves in aggregate.
- logging — Recording individual events in detail, such as one failed order, as text or structured lines.
Taught in
- Observability: Logs, Metrics, Traces — Modern API Architecture: REST, GraphQL & gRPC
- Asking Telemetry Why, With KQL — Microsoft Azure DevOps Engineer Expert (AZ-400) Exam Prep
- Slow At Lunchtime: Logs, Traces And Alerts — CompTIA Cloud+ (CV0-004) Exam Prep
- Operations Sprint: Twelve Servers, Two Hours — CompTIA Cloud+ (CV0-004) Exam Prep
- Resilient Error Handling: Problem Details & Envelopes — Production Full-Stack Engineering
- Distributed Tracing: OpenTelemetry & Traceparent — Production Full-Stack Engineering
- Structured Logging & Correlation IDs: Context Stitching — Production Full-Stack Engineering
- Full-Stack System Verification: Capstone Integration — Production Full-Stack Engineering
- Instrumentation: OpenTelemetry & Performance Spans — Next.js 15 & Modern App Router Architecture
- Routing & Middleware: Path Parsing & Async Context — Node.js Internals & Backend Services
- The Three Signals: Logs, Metrics And Traces — Full-Stack Observability: Metrics, Tracing & Logging
- Traces, Spans And Context Propagation — Full-Stack Observability: Metrics, Tracing & Logging
- Instrumenting A Service With Client Libraries — Full-Stack Observability: Metrics, Tracing & Logging
- Load Balancing And The Failure Modes It Introduces — Scalable System Design & Distributed Architecture
- Monolith Versus Services: The Honest Trade Offs — Scalable System Design & Distributed Architecture
- Observability As A Design Input — Scalable System Design & Distributed Architecture
References
- OpenTelemetry: Traces
- W3C Trace Context
- Sigelman et al.: Dapper, a Large-Scale Distributed Systems Tracing Infrastructure (Google Research)