Skip to main content
POST
Get bucketed metrics for spans

Authorizations

x-api-key
string
header
required

Headers

x-selected-account-id
string | null

Query Parameters

from_ts
string<date-time> | null

The starting (oldest) timestamp in ISO format.

to_ts
string<date-time> | null

The ending (most recent) timestamp in ISO format.

Body

application/json
parents_only
boolean

Only fetch spans that are the top-level (ie. have no parent_id)

span_ids
string[]

Filter by span IDs

trace_ids
string[]

Filter by trace IDs

excluded_span_ids
string[]

List of span IDs to exclude from results

excluded_trace_ids
string[]

List of trace IDs to exclude from results

group_id
string

Filter by group ID

names
string[]

Filter by trace/span name

statuses
enum<string>[]

Filter on span status

Available options:
SUCCESS,
ERROR,
CANCELED
types
enum<string>[]
Available options:
TEXT_INPUT,
TEXT_OUTPUT,
COMPLETION_INPUT,
COMPLETION,
KB_RETRIEVAL,
KB_INPUT,
RERANKING,
EXTERNAL_ENDPOINT,
PROMPT_ENGINEERING,
DOCUMENT_INPUT,
MAP_REDUCE,
DOCUMENT_SEARCH,
DOCUMENT_PROMPT,
CUSTOM,
CODE_EXECUTION,
DATA_MANIPULATION,
EVALUATION,
FILE_RETRIEVAL,
KB_ADD_CHUNK,
KB_MANAGEMENT,
GUARDRAIL,
OUTPUT_GUARDRAIL,
TRACER,
AGENT_TRACER,
AGENT_WORKFLOW,
STANDALONE
search_texts
string[]

Free text search across span input and output fields. For exact trace ID lookup, use the trace_ids filter.

extra_metadata
Extra Metadata · object

Filter on custom metadata key-value pairs

application_variant_ids
string[]

Filter by application variant IDs

assessment_types
string[]

Filter spans by traces that have assessments of these types

acp_types
string[]

Filter by ACP types

agentex_agent_names
string[]

Filter by Agentex agent names

agentex_agent_ids
string[]

Filter by Agentex agent IDs

min_duration_ms
integer

Minimum span duration in milliseconds (inclusive)

max_duration_ms
integer

Maximum span duration in milliseconds (inclusive)

bucket_minutes
integer
default:30

Size of each time bucket in minutes

Response

Successful Response

items
SpansMetricsBucket · object[]
required
bucket_minutes
integer
default:30

Effective bucket size in minutes