aspire otel traces command
aspire otel traces - View traces from the Dashboard telemetry API.
Synopsis
Section titled “Synopsis”aspire otel traces [resource] [options]Description
Section titled “Description”The aspire otel traces command retrieves and displays distributed traces collected by the Aspire Dashboard. A trace represents a complete request as it flows through your distributed application. The command shows trace summaries including timestamp, name, span count, duration, and status.
You can view a summary of all traces, or provide a specific trace ID with --trace-id to view a detailed span tree for that trace.
Arguments
Section titled “Arguments”-
[resource]Filter by resource name. When specified, only traces involving the matching resource are shown. Supports both exact instance names and base resource names (which match all replicas).
Options
Section titled “Options”The following options are available:
-
--apphostThe path to the Aspire AppHost project file.
-
--format <Table|Json>Output format (Table or Json).
-
-n, --limit <limit>Maximum number of items to return.
-
-t, --trace-id <trace-id>Filter by trace ID. When specified, displays a detailed span tree for the given trace instead of a summary list.
-
--has-error <true|false>Filter by error status (true to show only errors, false to exclude errors).
-
-?, -h, --helpPrints help and usage documentation for the available commands and options.
-
-d, --debugEnable debug logging to the console, which prints detailed information about what Aspire CLI is doing when a command is run.
-
--wait-for-debuggerWait for a debugger to attach before running a command.
Examples
Section titled “Examples”-
View all traces:
Aspire CLI aspire otel traces -
View traces for a specific resource:
Aspire CLI aspire otel traces apiservice -
View a specific trace detail:
Aspire CLI aspire otel traces --trace-id abc123 -
View only traces with errors:
Aspire CLI aspire otel traces --has-error true -
View the last 20 traces in JSON format:
Aspire CLI aspire otel traces --limit 20 --format Json