Distributed Tracing
Distributed tracing follows a single request as it moves through multiple services in a distributed system, recording timing and metadata at each hop. It reveals where latency accumulates and which service interactions cause failures in microservice architectures.
itObservability and performance | OpenSkills.info
Course pathWalk it in order
Look it upDip in anytime
Go furtherLeaves this page
Don't Panic
Don't Panic — Distributed Tracing
Distributed tracing is the record of one request as it wanders through a distributed system, collecting timed pieces of work called spans. The request may begin at a gateway, visit several services, leave a note at a queue, and ask a database an awkward question. Metrics can report that something is slow. Logs can report what one component said. A trace is the evidence that lets those statements refer to the same journey.
The important shape is a tree. A root span represents the overall operation, and child spans represent work caused by it. Each span has a trace ID, a span ID, timing, status, attributes, events, and sometimes links. This sounds like bookkeeping because it is bookkeeping. In a system with many services, accurate bookkeeping is what keeps a timeout from becoming a small archaeological expedition.
The bit that makes the tree cross service boundaries is context propagation. Sending instrumentation puts trace context into a carrier, such as request headers. Receiving instrumentation extracts it and creates a child span. OpenTelemetry uses W3C Trace Context by default, including the traceparent header. If injection or extraction fails, the trace does not become slightly less tidy; it becomes disconnected fragments that cannot show the end-to-end path.
A useful trace also needs useful span design. Stable operation names group similar work, while request-specific values belong in attributes. Attributes and events are valuable until they contain secrets, personal data, or unbounded values. Sampling then decides which trace data is exported. An early decision is cheaper but cannot know the final error or latency. A later decision knows more but needs more collection infrastructure. There is no magic setting, only a policy that preserves the incidents worth investigating.
Start with the Intro for the complete model and collection path. Use the Slides for the relationships between traces, metrics, logs, propagation, and sampling. Keep the Cheatsheet open while reading an unfamiliar waterfall. Then use the practice reference and exercise to prove one request remains connected across a real boundary. A long span is evidence, not a verdict, which is an excellent habit to acquire before the graph starts looking persuasive.
Where this skill leads
Relevant careers
See how this topic contributes to broader role-level skill maps.
Sources
- https://opentelemetry.io/docs/concepts/observability-primer/
Supports
- Distributed traces as the path of one request through services
- Traces composed of root and child spans and waterfall visualization
- Distinctions and correlation among traces, metrics, and logs
- Rationale for the first link and quiz questions 01 and 09
- https://opentelemetry.io/docs/concepts/signals/traces/
Supports
- Span fields, nesting, span context, attributes, events, links, status, and kinds
- Tracers creating spans and exporters sending traces to consumers
- Trace exporters sending to standard output, the Collector, or backends
- Rationale for the second link and quiz question 02
- Official OpenTelemetry tracing reference and course official URL
- https://opentelemetry.io/docs/concepts/context-propagation/
Supports
- Context propagation across process and network boundaries
- Injection into and extraction from carriers
- Trace and parent identifiers joining downstream spans to one trace
- OpenTelemetry default use of W3C Trace Context
- Rationale for the third link and quiz questions 03 and 06
- Practice reference and propagation exercise
- https://www.w3.org/TR/trace-context/
Supports
- Traceparent and tracestate processing and forwarding
- Traceparent version, trace identifier, parent identifier, and flags
- Tracestate as vendor-specific trace information
- Privacy and security constraints for propagated headers
- Rationale for the fourth link and quiz question 04
- https://opentelemetry.io/docs/specs/otel/trace/api/
Supports
- SpanContext identifiers, flags, state, and immutability
- Span fields, parent selection, links, events, status, and span kinds
- Stable, general span naming instead of instance-specific names
- Rationale for the fifth link and quiz questions 05 and 08
- https://opentelemetry.io/docs/specs/otel/trace/sdk/
Supports
- Sampling as control of tracing noise and overhead
- Sampling decisions, processors, simple and batch processing, exporters, and queue limits
- Out-of-process processing in the OpenTelemetry Collector
- Rationale for the sixth link and quiz question 07
- Sampling field note
- https://opentelemetry.io/docs/collector/
Supports
- Collector as a vendor-neutral proxy for receiving, processing, and exporting telemetry
- Rationale for the seventh link
- https://opentelemetry.io/docs/demo/
Supports
- Reproducible microservice demo deployment and trace scenarios
- Practice reference and exercise environment
- https://research.google/pubs/dapper-a-large-scale-distributed-systems-tracing-infrastructure/
Supports
- 2010 Dapper milestone
- Sampling and common-library instrumentation history
- https://www.cncf.io/wp-content/uploads/2020/08/CNCF_JAEGER_Project_Journey_Report.pdf
Supports
- 2015 Jaeger creation and 2017 CNCF milestone
- https://github.com/cncf/gitdm.archive
Supports
- 2016 OpenTracing CNCF join milestone
- https://www.w3.org/TR/2018/WD-distributed-tracing-20181106/
Supports
- 2018 first public Trace Context working draft
- https://www.w3.org/standards/history/trace-context-1/
Supports
- 2020 W3C Trace Context Recommendation milestone
- https://www.cncf.io/blog/2021/08/26/opentelemetry-becomes-a-cncf-incubating-project/
Supports
- 2019 OpenTelemetry merger
- 2021 OpenTelemetry CNCF incubation milestone
- https://www.jaegertracing.io/
Supports
- Jaeger landscape entry
- https://grafana.com/oss/tempo/
Supports
- Grafana Tempo landscape entry
- https://www.honeycomb.io/
Supports
- Honeycomb landscape entry
- https://www.datadoghq.com/
Supports
- Datadog landscape entry
- https://newrelic.com/
Supports
- New Relic landscape entry
