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
- Benjamin H. Sigelman, Luiz André Barroso, Mike Burrows, Pat Stephenson, Manoj Plakal, Donald Beaver, Saul Jaspan, Chandan Shanbhag (2010). Dapper, a Large-Scale Distributed Systems Tracing Infrastructure.