Skip to main content
The ax spans annotate and ax spans delete commands are currently in BETA. The API may change without notice. A one-time warning is emitted on first use. The ax spans export command is stable and generally available.
The ax spans commands let you export span data from your Arize projects.

ax spans export

Export spans to a JSON file. Filter by trace ID, span ID, or session ID (mutually exclusive), and optionally combine with --filter for additional narrowing. Without any ID flag, all spans matching the time window are exported.
--trace-id, --span-id, and --session-id are mutually exclusive. Only one may be provided per invocation.
Examples:

ax spans annotate

Annotate a batch of spans in a project. Provide annotations via --file (JSON, JSONL, CSV, or Parquet; use - for stdin). Each record must have a record_id (the span ID) and values (a list of annotation dicts with at least name, plus optionally score, label, or text). Annotations are upserted; up to 1000 spans may be annotated per request. If any span ID is not found within the time window, the entire request is rejected.
Examples:

ax spans delete

Permanently delete spans by ID. This operation is irreversible. Spans not found within the supported lookback window are silently ignored.
Examples: