Use it to find where latency or errors occur in multi-service requests.
Distributed Tracing
Distributed tracing follows a request across services as a trace made of spans (operations with timing, attributes and parent/child links), propagated by trace context headers.
1. Find a slow trace in the backend (Jaeger/Tempo) for the service.
2. Look for the longest span and gaps.
3. Broken trace? check traceparent header propagation.
4. Error spans and attributes.
5. Link to logs by trace_id.
request → root span → context propagated → child spans → exported → assembled trace
Common failures are broken context propagation, clock skew, spans ended too early/late, excessive or missing attributes, head sampling dropping rare errors and assuming a slow child span proves the downstream service is the root cause. Preserve the first divergent observation and repeat the same bounded verification after remediation.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Common failures are broken context propagation, clock skew, spans ended too early/late, excessive or missing attributes, head sampling dropping rare errors and assuming a slow child span shows the downstream service is the root cause.
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification workflow Verify boundary
Start from a trace/request ID, inspect the critical path and error spans, then correlate service logs/metrics using shared identifiers and timestamps. Confirm sampling policy and propagation headers/context at the boundary where the trace becomes fragmented.
Step 2 Failure signatures and limits Narrow the fault
Common failures are broken context propagation, clock skew, spans ended too early/late, excessive or missing attributes, head sampling dropping rare errors and assuming a slow child span shows the downstream service is the root cause.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Subtopics
Go one level deeper into this subject.
A trace is a tree of spans; each span records one operation with start time, duration, attributes and its parent span ID.
Subtopic Trace SamplingSampling keeps a share of traces to control cost; head sampling decides at the start, tail sampling decides after seeing the whole trace.
Every hop must propagate context (W3C traceparent), or traces break. Sampling keeps costs down — make sure error traces are kept.
traceparent— first check for this topiccurl -s localhost:9090/-/ready— Prometheus readycurl -s 'localhost:9090/api/v1/query?query=up'— scrape targets up/downpromtool check config prometheus.yml— config valid
ReferenceWhat it is1 section · depth on demand
Operating model
Distributed Tracing follows a request across process/service boundaries using a trace ID and spans that represent timed operations. Parent-child relationships describe causal structure, while attributes/events add dimensions. Context propagation is the critical continuity mechanism; without it, separate spans cannot be assembled reliably.
ReferenceHow it works1 section · depth on demand
In depth
Distributed tracing follows a single request as it passes through multiple services, recording each step as a span with timing and metadata. Traces show where latency and errors occur in microservice and multi-tier architectures, which metrics and logs alone cannot pinpoint.
| Concept | Meaning |
|---|---|
| Trace | The full journey of one request |
| Span | One operation (HTTP call, DB query) with start/end and attributes |
| Context propagation | Trace ID passed between services (W3C traceparent header) |
| Sampling | Recording a subset of traces (head-based or tail-based) |
Tools: OpenTelemetry for instrumentation; Jaeger, Grafana Tempo, Zipkin or commercial APM back ends for storage and analysis.
Value comes from correlation: put the trace ID in logs, link exemplars from latency metrics to traces, and use tail-based sampling to keep slow and failed traces while discarding most successful ones.
ReferenceImportant terms & boundaries1 section · depth on demand
Scope map
- Trace/span model
- Parent-child relationships
- Context propagation
- Attributes/events
- Sampling
- Trace/log/metric correlation
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Configuration & expected output
Concrete examples are shown only when the stored reference contains an actual configuration or output shape for this Topic.
Configuration example
Assumptions: Both services use an OpenTelemetry SDK with default propagators.
export OTEL_PROPAGATORS=tracecontext,baggage
# outgoing request header added by the SDK:
traceparent: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01Expected output
curl -s -H 'traceparent: 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01' http://checkout:8080/healthz -o /dev/null -w "%{http_code}\n"Expected state: The downstream span appears in the same trace ID as the caller.
200
# trace view: 4bf92f3577b34da6a3ce929d0e0e4736
# frontend GET /cart 120 ms
# checkout GET /healthz 3 msIf the downstream service starts a new trace ID, a proxy or SDK dropped the traceparent header. Illustrative authored output: field layout matches the tool, values will differ in your environment.Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Documentation verification: confirms the upstream model used by the Topic. It does not assert local production behavior.
Basis: https://opentelemetry.io/docs/concepts/context-propagation/ · confidence 92%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Quick lookup tables
Distributed Tracing verification boundary matrix
A compact lookup separating intent, owning component state, effective state and consumer-visible outcome for Distributed Tracing.
| Boundary | Inspect | Healthy interpretation | Do not infer |
|---|---|---|---|
| Intent | Trace/span model | Intended object/scope is explicit and versioned where relevant | Intent is already effective |
| Owning runtime/control plane | Parent-child relationships / Context propagation | Owner accepts and reports the expected object state | Downstream dependencies are healthy |
| Effective state | Attributes/events | Independent read-back matches the intended state | Every client sees the same result |
| Consumer outcome | Sampling | The original bounded check succeeds in the same time window | Production correctness outside this scope |
Deep reference
Design & tradeoffs
Scope
Observability owns trace instrumentation/pipeline/query mechanics. Service/application Domains own whether the traced operation produced correct business or infrastructure state.