doctl insights spans search

Generated on 28 Oct 2026 from doctl version v2.1.0

Usage

doctl insights spans search [flags]

Description

Searches tracing spans in a region.

Build the search with flags, or pass the complete snake_case public API request as JSON or YAML with --request-file. Request files use time_range and order_by; --limit overrides pagination from a request file.

The --filter and --filter-file values use logs-style expressions with exactly one of condition, and, or, not, or text_search. Condition values are typed with string_value, number_value, string_array_value, or number_array_value.

Time ranges must not exceed seven days. Results are returned one page at a time; spans pagination reports whether more results matched but does not provide a cursor.

Example

The following example searches the last hour of spans in nyc3:

doctl insights spans search --region nyc3 --from 1h --order-by start_time:desc --filter '{"condition":{"field":{"name":"service_name"},"operator":"FILTER_OPERATOR_EQ","value":{"string_value":"api"}}}'

Flags

Option Description
--filter A JSON logs-style filter expression using condition, and, or, not, or text_search
--filter-file Read a JSON or YAML filter expression from path, or - to read from stdin
--format Columns for output in a comma-separated list. Possible values: TraceID, SpanID, ParentSpanID, StartTime, Duration, Name, Kind, Status, Service.
--from Start of the time range. Defaults to 1h
--help, -h Help for this command
--limit Maximum number of results to return, from 1 to 1000
Default: 0
--no-header Return raw data with no headers
Default: false
--order-by Sort clause in the form field[:asc|desc]; repeat to sort by several fields
--region The region slug to query, for example nyc3 (required)
--request-file Read a complete JSON or YAML search request from path, or - to read from stdin
--to End of the time range. Defaults to now
Command Description
doctl insights spans Display commands for searching Insights spans

Global Flags

Option Description
--access-token, -t API V2 access token
--api-url, -u Override default API endpoint
--config, -c Specify a custom config file
Default:
    --context Specify a custom authentication context name
    --http-retry-max Set maximum number of retries for requests that fail with a 429 or 500-level error
    Default: 5
    --http-retry-wait-max Set the minimum number of seconds to wait before retrying a failed request
    Default: 30
    --http-retry-wait-min Set the maximum number of seconds to wait before retrying a failed request
    Default: 1
    --interactive Enable interactive behavior. Defaults to true if the terminal supports it (default false)
    Default: false
    --output, -o Desired output format [text|json]
    Default: text
    --show Reveal masked values, such as secrets, instead of hiding them. Values are unmasked automatically in CI
    Default: false
    --trace Show a log of network activity while performing a command
    Default: false
    --verbose, -v Enable verbose output
    Default: false

    We can't find any results for your search.

    Try using different keywords or simplifying your search terms.