When a user clicks a button, that single action often fans out into dozens of internal calls: an API gateway, an auth service, a product service, a database, a cache, a payment provider. A trace is the complete story of that one request across all of those hops, assembled into a single timeline.
A trace is made of spans. Each span represents one unit of work, for example the database query, the call to the auth service, or the time spent in the gateway. Every span records a start time, a duration, the service that produced it, and key/value attributes like the HTTP status code or the SQL statement. Spans nest: a parent span (the gateway handling the request) contains child spans (the downstream calls it made).
What ties the spans together is a shared trace ID. The first service that receives the request generates the trace ID and a root span ID, then passes both forward in request headers. Every downstream service reuses the same trace ID and adds its own spans pointing back to the parent. When you collect all spans that share a trace ID, you get the full tree.