← Glossary / 30 of 100

n. / Tracing basics

Span event

Definition

A span event is a timestamped note recorded inside a span, marking something that happened at a moment in time rather than over a duration. Typical examples are an exception, a retry, or the arrival of the first streamed token.

In more detail

Events keep a span readable. Instead of creating a tiny span for every small moment, you add an event to the span that was running. Exceptions are the most useful case, since the error message and stack trace stay attached to the exact step that failed.

Example

A tool-call span for a payments API records an event "retry" at 2.1 s and a second event "retry" at 4.3 s, then ends with status error. You can see the agent tried three times before giving up.

Definitions are the start.

Open a real trace and watch these terms move.