Tracing Basics (Request Flow)
On this page
Tracing Connects the Dots
Tracing helps you see where time is spent across boundaries (HTTP calls, DB queries). It is crucial when logs alone cannot explain latency.
Trace Context Basics
- Every request gets a trace_id and spans for sub-operations.
- Propagate trace context across service calls.
- Correlate traces with logs using trace_id fields.
Operational Checklist
- Ensure trace_id appears in logs for key events.
- Sample intelligently (keep errors at higher sampling rates).
- Instrument boundaries first: HTTP entry, DB calls, external APIs.
Failure Modes
- Broken propagation: spans cannot be connected across services.
- Over-instrumentation: tracing overhead becomes noticeable under load.