Skip to main content

Returns

Returns a list of Span objects.

Example

Parameters

string | list[string]
Filter spans by trace ID(s).
string | list[string]
Filter spans by session ID(s).
list[string | SpanType]
Filter spans by type. Options: SPAN, GENERATION, EVENT, AGENT, TOOL, CHAIN, RETRIEVER, EVALUATOR, EMBEDDING, GUARDRAIL. Other string values are sent to the API unchanged, so values added in newer API versions can be used; the API rejects invalid ones.
list[string]
Filter spans by name.
str | int
default:"None"
Filter spans started at or after this timestamp. Accepts ISO 8601 string (e.g., '2024-01-01T00:00:00Z') or Unix timestamp in seconds. Can be used independently or together with to_start_time.
str | int
default:"None"
Filter spans started at or before this timestamp. Accepts ISO 8601 string (e.g., '2024-12-31T23:59:59Z') or Unix timestamp in seconds. Can be used independently or together with from_start_time.
string
Sort spans by start_time. Valid values: asc, desc.
int
Number of spans to skip for pagination. Default: 0.
int
Maximum number of spans to return. Default: 10000.
string | list[string]
default:"None"
The ID or IDs of the span(s) to retrieve.
At least one of trace_id, session_id, or id must be provided.