aspire otel spans command
Name
aspire otel spans - View spans from the Dashboard telemetry API.
Synopsis
aspire otel spans [resource] [options]
Description
The aspire otel spans command retrieves and displays distributed trace spans collected by the Aspire Dashboard. Spans represent individual units of work within a distributed trace, such as HTTP requests or database calls. You can filter spans by resource name, trace ID, or error status. Use --follow to stream spans in real-time as they arrive.
Arguments
[resource]Filter by resource name. When specified, only spans from the matching resource are shown. Supports both exact instance names and base resource names (which match all replicas).
Options
The following options are available:
--apphost <apphost>The path to the Aspire AppHost project file.
-f, --followStream telemetry in real-time as it arrives.
--format <Table|Json>Output format (Table or Json).
-n, --limit <limit>Maximum number of items to return.
--trace-id <trace-id>Filter by trace ID.
--has-error <true|false>Filter by error status (true to show only errors, false to exclude errors).
-
-
-
-
-
Examples
-
-
-
-
View all spans:
aspire otel spansView spans for a specific resource:
aspire otel spans apiserviceStream spans in real-time:
aspire otel spans --followView only error spans:
aspire otel spans --has-error trueView spans for a specific trace in JSON format:
aspire otel spans --trace-id abc123 --format Json