DELAPARRA
Index
Color
NL
Category: Observability

span

Explained by Updated

What is span?

span: A single timed unit of work within a trace — one operation, with a start, duration, parent, and attributes. A span is one timed operation within a trace: a database query, an outgoing HTTP call, rendering a view or a function you chose to measure. It records when it started, how long it took, which span it belongs to, and attributes such as the SQL statement or status code.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about span

How is span used in practice?

Spans nest. A request span contains spans for each query and API call made during that request, which together show exactly where time was spent.

What should you keep in mind with span?

Automatic instrumentation creates spans for common operations. Add your own for important business steps, such as calculating shipping or generating an invoice PDF, with clear names and useful attributes. Avoid putting personal data or secrets in span attributes, since traces are usually visible to everyone with access to the monitoring tools.

What does an example of span look like?

span: "SELECT orders" parent=api duration=80ms db.system=postgres

At a glance

CategoryObservability
Explained by
Updated

More Observability terms

All terms starting with S

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.