163 Tracing and Context Propagation
163 Tracing and Context Propagation
Tracing makes distributed latency visible by preserving causal context across boundaries.
Propagation Path
gateway -> service A -> service B -> datastore
context + trace headers propagated at each hop
Common Failure Mode
A single missing propagation point breaks end-to-end trace visibility. This often happens in background goroutines or manual HTTP client construction.
Design Guidance
- Accept
context.Contextat API boundaries. - Pass context through outbound calls without replacement.
- Record operation-level spans around DB and external dependencies.
Outcome
Correct tracing turns unknown latency into attributable latency.