Skip to main content
The spans functions are currently in BETA. The API may change without notice. A one-time warning is emitted on first use.

List Spans

List spans for a given project. Supports time-window filtering, SQL-style filter expressions, and cursor-based pagination.

Parameters

Span Fields

Each returned Span object includes:

Annotate Spans

Write human annotations to a batch of spans in a project. Annotations are upserted by annotation config name for each span; submitting the same name for the same span overwrites the previous value. Up to 1000 spans may be annotated per request. Spans are looked up within the specified time window (defaulting to the last 31 days). If any span ID in the batch is not found within the window, the entire request is rejected with a 404 error.

Parameters

Returns void. The writes are submitted to the database layer but may not be immediately visible in queries (HTTP 202 Accepted).

Delete Spans

Permanently delete spans by their IDs. This operation is irreversible. Only spans within the supported lookback window (2 years) are considered; older spans are not affected. All span IDs are sent in a single request (maximum 5,000 per call).

Parameters

Return Value

Returns a SpanDeleteResult with the following fields: