The
ax spans commands are currently in ALPHA. The API may change without notice. A one-time warning is emitted on first use.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.
| Option | Description |
|---|---|
project | Project name or ID (required, positional argument) |
--trace-id | Filter to spans belonging to a specific trace |
--span-id | Filter to a specific span |
--session-id | Filter to spans in a specific session |
--filter | Additional filter expression (e.g. "status_code = 'ERROR'", "latency_ms > 1000") |
--space | Space name or ID (required when using --all) |
--days | Lookback window in days (default: 30) |
--start-time | Override start of time window (ISO 8601) |
--end-time | Override end of time window (ISO 8601) |
--limit | Maximum number of spans to export (default: 100, ignored with --all) |
--output-dir | Directory to write the output file (default: current directory) |
--stdout | Print JSON to stdout instead of saving to a file |
--all | Use Arrow Flight for bulk export — streams all matching spans, ignores --limit |
--trace-id, --span-id, and --session-id are mutually exclusive. Only one may be provided per invocation.