How does distributed tracing work?
Whether you understand request correlation across services.
Trace ID ties one request together, span IDs are individual operations, context propagates via headers.
Conflating traces with logs or omitting propagation entirely.
WHAT THIS TESTS This probes whether you understand how observability stitches a single logical request back together once it fans out across many independently deployed services.
A GOOD ANSWER COVERS A trace represents the full journey of one request and is identified by a single trace ID created at the entry point. Within that trace, each unit of work is a span identified by a span ID, and each span records a parent span ID, building a tree that captures causality and timing. Context propagation is the mechanism that carries the trace ID and current span ID across process boundaries, typically by injecting them into outbound request headers using a standard like W3C traceparent. The downstream service extracts that context, creates a child span, and continues the chain. Each span records start time, duration, status, and attributes, so the backend can assemble a waterfall view showing where latency accumulated.
COMMON WRONG ANSWERS Treating tracing as merely centralized logging, ignoring the parent-child relationship that makes the tree meaningful, or assuming correlation happens automatically without explicit header propagation. Another mistake is conflating the trace ID and span ID, or claiming sampling is unrelated to tracing.
LIKELY FOLLOW-UPS How does propagation survive async work like message queues? What happens when one service drops the context? How do head-based versus tail-based sampling affect what you actually capture? How do baggage and span attributes differ?
ONE CONCRETE EXAMPLE A user hits an API gateway, which mints trace ID abc123 and span A. It calls the orders service with traceparent containing abc123 and span A, so orders creates child span B and then calls payments, which creates span C. All three spans share abc123 but have distinct span IDs and linked parents. The tracing backend groups them by abc123 and renders a waterfall showing payments span C consumed 400 of the 500 milliseconds, immediately pinpointing the slow hop.
Interview question
Across three microservices handling one request, what value is identical on every span, and what value distinguishes each operation within that request?
- a.Trace ID is shared; span ID distinguishes each operationCorrect
- b.Both trace ID and span ID are shared across all spans
- c.A new trace ID is generated at each service hop
- d.Span ID is shared; trace ID distinguishes each operation
Why? this is the answer
The trace ID is generated once and carried by every span to group them, while each operation gets its own span ID. Sharing span IDs or minting new trace IDs per hop would break correlation entirely.
Just read this? Test yourself on what you have been reading.
Read the original → opentelemetry.io
Put your scrolling time to good use
Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.
See open roles