aspire otel traces command

Name

aspire otel traces - View traces from the Dashboard telemetry API.

Synopsis

aspire otel traces [resource] [options]

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

  • [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

The following options are available:

  • --apphost <apphost>

    The 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).

            • Examples

  • View all traces:

    aspire otel traces
    
  • View traces for a specific resource:

    aspire otel traces apiservice
    
  • View a specific trace detail:

    aspire otel traces --trace-id abc123
    
  • View only traces with errors:

    aspire otel traces --has-error true
    
  • View the last 20 traces in JSON format:

    aspire otel traces --limit 20 --format Json
    

See also