Lexicon
Span
What a span is in distributed tracing: the timed unit of work inside a trace, how span kinds and attributes work, and how to get span granularity right.
On this page
Definition
A span is a single timed operation inside a trace: an HTTP request, a database call, a queue publish, or an internal step worth measuring. Each span records a name, start and end time, attributes, a status, and its parent, and together the spans of one request form a tree.
What it means in observability
Spans are the atomic unit of tracing, and they answer the question every latency investigation starts with: where did the time go. A trace tells you a request took two seconds; its spans tell you 1.7 of those seconds sat in one database call. Because spans carry attributes, they are also queryable events in their own right, so you can ask questions like which endpoints produce the slowest database calls without reading a single full trace.
How it works in practice
Application code and auto instrumentation create spans through a tracer, and each span carries a kind that describes its boundary: server, client, producer, consumer, or internal. Attributes attach detail such as the HTTP route or database statement, named per the semantic conventions. Events mark timestamped moments inside a span, and links connect causally related spans that are not parent and child, which is how asynchronous messaging gets modeled. Completed spans export over OTLP, and the backend reassembles them into traces by shared trace ID.
Where it gets hard
Granularity is the recurring judgment call. Too few spans and investigations dead-end in one giant block of unexplained time; too many and traces become unreadable while volume costs climb. Naming needs discipline too: span names should be low cardinality templates like GET /users/:id rather than raw URLs, or grouping and analytics degrade. And async work trips teams up, since modeling a fire-and-forget job as a child span misrepresents the timing that links exist to capture.
Where Tsuga fits
Tsuga supports full span level search alongside whole trace views, with flame graphs for reading where duration accumulates. Span attributes keep their OpenTelemetry names, so queries written against the conventions work unchanged.
Related terms
- APIAn API, or application programming interface, is the defined contract through which one piece of software talks to another.
- CardinalityCardinality is the number of distinct values, or distinct value combinations, that an attribute or set of attributes can take.
- Context propagationContext propagation is the OpenTelemetry mechanism that carries trace identifiers and baggage across process boundaries, so that spans created in different services join into a single trace.
- Distributed tracingDistributed tracing is the technique of following a request across service boundaries by recording a connected span for each operation it touches.
- Real user monitoring (RUM)Real user monitoring, RUM, captures what actual users experience in their browsers and mobile apps: page load performance, interaction responsiveness, errors, and the shape of whole sessions.
- Semantic conventionsSemantic conventions are OpenTelemetry's standard vocabulary: the agreed names, types, and values for the attributes that describe telemetry.
- TraceA trace is the end to end record of one request or workflow as it moves through a system, composed of all the spans that share a single trace ID.