advanced
Tracing
Distributed traces that connect requests, spans, services, queues, and dependencies into one latency and causality view.
Tracing interviews follow causality across services: spans, trace propagation, sampling, and OpenTelemetry as the portable instrumentation layer for Node and browser apps.
Subtopics: distributed tracing, spans, trace IDs, OpenTelemetry.
On interviews: trace a payment through API, Stripe, and receipt worker; explain broken context at SQS; head vs tail sampling.
Common pitfalls: spans only in one service; huge traces; missing error status on failed spans.
The trade-off is end-to-end visibility versus instrumentation effort and trace storage cost.
Checklist:
- Propagate W3C trace context.
- Span at dependency boundaries.
- Sample errors and slow paths preferentially.
- Link trace ID to structured logs.