A span is a single timed operation within a trace, such as one service call or one database query. It records when the operation started, how long it took, whether it succeeded and descriptive attributes. Spans are linked in parent-child relationships, and together they form the trace, which shows the path of a request through a system.

By looking at the spans, engineers can see where time is spent and where errors occur. For example, a slow request may show that one downstream call accounts for most of the delay.

The number and detail of spans affect usefulness and cost. Too few spans hide what is happening inside a service, while too many create noise and increase storage and processing costs. Attributes with many distinct values or sensitive content can add expense or risk. Spans also only help if the surrounding context is passed correctly between services, so that they join up into one trace.

To use them well, create spans for meaningful operations such as outbound calls and key business steps, name them consistently, add a limited set of useful attributes, avoid sensitive data and review which spans are actually used during investigations.