Search spans like you search logs
The spans query command brings to spans the same filtering, output formats, and custom columns you already know from logs query:
1234dash0 -X spans query \--from now-1h \--filter "service.name is checkout-service" \--filter "otel.span.status.code is ERROR"
The default table shows timestamp, duration, span name, status, service name, parent ID, trace ID, and span links. Swap in any OTLP attribute as a column to surface the dimensions that matter to your investigation:
12345dash0 -X spans query \--column timestamp \--column duration \--column "span name" \--column http.request.method
JSON and CSV outputs are available for scripting and downstream processing.
Reconstruct full traces
Once you have a trace ID — from a span query, a log record, or an alerting rule — traces get fetches every span in the trace and displays them as an indented tree:
1dash0 -X traces get 0af7651916cd43dd8448eb211c80319c
Follow span links across trace boundaries
Modern architectures do not always fit into a single trace. A message queue consumer might link back to the producer's trace; a batch job might reference the request that triggered it.
The --follow-span-links flag tells the CLI to chase those connections automatically:
1dash0 -X traces get 0af7651916cd43dd8448eb211c80319c --follow-span-links
The CLI walks span links recursively (up to 20 traces), displaying each linked trace under a clear header. You can set a custom lookback period for the linked traces, like --follow-span-links 2h, to control how far back the search reaches.
Get started
1234export DASH0_API_URL=... # Get the value at https://app.dash0.com/goto/settings/endpoints?endpoint_type=api_httpexport DASH0_AUTH_TOKEN=... # Get the value at https://app.dash0.com/goto/settings/auth-tokensdash0 -X spans query --from now-15m
Span and trace commands are experimental: enable them with -X and tell us how they fit into your workflow.




