Try
↑ ↓ move↵ openesc close

Interview prep / Distributed tracing

Junior · Distributed tracing · System design interview question

What is a trace and what is a span?

Sketch your own answer first, then compare it with the one below.

A strong answer

A trace is the record of one request and everything it caused across services. It is a tree. Each node is a span, which is one timed operation such as a call to a service or a database query.

A span has a start time, an end time, a name, a parent span and tags. All spans in a trace share one trace identifier, which is what lets the pieces from different services be joined into one picture.

That is the payoff. A metric tells you something is slow. A trace tells you which call in which service took the time on one particular request.

Sources

Learn it by running it

The distributed tracing lesson explains the mechanism behind this question, and its lab lets you change the parameters and watch the effect.

Your progress is saved in this browser. Sign in to keep it on every device. Privacy · Terms