Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions src/frontend/config/sidebar/reference.topics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,28 @@ export const referenceTopics: StarlightSidebarTopicsUserConfig = {
],
},
{ label: 'aspire new', slug: 'reference/cli/commands/aspire-new' },
{
label: 'aspire otel',
collapsed: true,
items: [
{
label: 'aspire otel',
slug: 'reference/cli/commands/aspire-otel',
},
{
label: 'aspire otel logs',
slug: 'reference/cli/commands/aspire-otel-logs',
},
{
label: 'aspire otel spans',
slug: 'reference/cli/commands/aspire-otel-spans',
},
{
label: 'aspire otel traces',
slug: 'reference/cli/commands/aspire-otel-traces',
},
],
},
{ label: 'aspire ps', slug: 'reference/cli/commands/aspire-ps' },
{
label: 'aspire publish',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
---
title: aspire otel logs command
description: Learn about the aspire otel logs command and its usage. This command views structured logs from the Dashboard telemetry API.
---

import Include from '@components/Include.astro';

## Name

`aspire otel logs` - View structured logs from the Dashboard telemetry API.

## Synopsis

```bash title="Aspire CLI"
aspire otel logs [resource] [options]
```

## Description

The `aspire otel logs` command retrieves and displays structured logs collected by the Aspire Dashboard. You can filter logs by resource name, trace ID, or severity level. Use `--follow` to stream logs in real-time as they arrive.

## Arguments

- **`[resource]`**

Filter by resource name. When specified, only logs 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`**

The path to the Aspire AppHost project file.

- **`-f, --follow`**

Stream 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.

- **`--severity <severity>`**

Filter logs by minimum severity (Trace, Debug, Information, Warning, Error, Critical).

- <Include relativePath="reference/cli/includes/option-help.md" />

- <Include relativePath="reference/cli/includes/option-debug.md" />

- <Include relativePath="reference/cli/includes/option-wait.md" />

## Examples

- View all structured logs:

```bash title="Aspire CLI"
aspire otel logs
```

- View logs for a specific resource:

```bash title="Aspire CLI"
aspire otel logs apiservice
```

- Stream logs in real-time:

```bash title="Aspire CLI"
aspire otel logs --follow
```

- View only error-level logs in JSON format:

```bash title="Aspire CLI"
aspire otel logs --severity Error --format Json
```

- View the last 50 logs for a resource:

```bash title="Aspire CLI"
aspire otel logs apiservice --limit 50
```

## See also

- [aspire otel command](../aspire-otel/)
- [aspire otel spans command](../aspire-otel-spans/)
- [aspire otel traces command](../aspire-otel-traces/)
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
---
title: aspire otel spans command
description: Learn about the aspire otel spans command and its usage. This command views spans from the Dashboard telemetry API.
---

import Include from '@components/Include.astro';

## Name

`aspire otel spans` - View spans from the Dashboard telemetry API.

## Synopsis

```bash title="Aspire CLI"
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`**

The path to the Aspire AppHost project file.

- **`-f, --follow`**

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

- <Include relativePath="reference/cli/includes/option-help.md" />

- <Include relativePath="reference/cli/includes/option-debug.md" />

- <Include relativePath="reference/cli/includes/option-wait.md" />

## Examples

- View all spans:

```bash title="Aspire CLI"
aspire otel spans
```

- View spans for a specific resource:

```bash title="Aspire CLI"
aspire otel spans apiservice
```

- Stream spans in real-time:

```bash title="Aspire CLI"
aspire otel spans --follow
```

- View only error spans:

```bash title="Aspire CLI"
aspire otel spans --has-error true
```

- View spans for a specific trace in JSON format:

```bash title="Aspire CLI"
aspire otel spans --trace-id abc123 --format Json
```

## See also

- [aspire otel command](../aspire-otel/)
- [aspire otel logs command](../aspire-otel-logs/)
- [aspire otel traces command](../aspire-otel-traces/)
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
---
title: aspire otel traces command
description: Learn about the aspire otel traces command and its usage. This command views traces from the Dashboard telemetry API.
---

import Include from '@components/Include.astro';

## Name

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

## Synopsis

```bash title="Aspire CLI"
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`**

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

- <Include relativePath="reference/cli/includes/option-help.md" />

- <Include relativePath="reference/cli/includes/option-debug.md" />

- <Include relativePath="reference/cli/includes/option-wait.md" />

## Examples

- View all traces:

```bash title="Aspire CLI"
aspire otel traces
```

- View traces for a specific resource:

```bash title="Aspire CLI"
aspire otel traces apiservice
```

- View a specific trace detail:

```bash title="Aspire CLI"
aspire otel traces --trace-id abc123
```

- View only traces with errors:

```bash title="Aspire CLI"
aspire otel traces --has-error true
```

- View the last 20 traces in JSON format:

```bash title="Aspire CLI"
aspire otel traces --limit 20 --format Json
```

## See also

- [aspire otel command](../aspire-otel/)
- [aspire otel logs command](../aspire-otel-logs/)
- [aspire otel spans command](../aspire-otel-spans/)
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
title: aspire otel command
description: Learn about the aspire otel command and its usage. This command is used to view OpenTelemetry data (logs, spans, traces) from a running apphost.
---

import Include from '@components/Include.astro';

## Name

`aspire otel` - View OpenTelemetry data (logs, spans, traces) from a running apphost.

## Synopsis

```bash title="Aspire CLI"
aspire otel [command] [options]
```

## Description

The `aspire otel` command provides subcommands for viewing OpenTelemetry data collected by the Aspire Dashboard from a running AppHost. You can view structured logs, distributed trace spans, and trace summaries directly from the terminal.

The data is retrieved from the Dashboard's telemetry API, so an AppHost must be running with the Dashboard enabled.

## Options

The following options are available:

- <Include relativePath="reference/cli/includes/option-help.md" />

- <Include relativePath="reference/cli/includes/option-debug.md" />

- <Include relativePath="reference/cli/includes/option-wait.md" />

## Commands

The following commands are available:

| Command | Function |
| ------------------------------------------------ | ------------------------------------------------------- |
| [`aspire otel logs`](../aspire-otel-logs/) | View structured logs from the Dashboard telemetry API. |
| [`aspire otel spans`](../aspire-otel-spans/) | View spans from the Dashboard telemetry API. |
| [`aspire otel traces`](../aspire-otel-traces/) | View traces from the Dashboard telemetry API. |

## See also

- [aspire otel logs command](../aspire-otel-logs/)
- [aspire otel spans command](../aspire-otel-spans/)
- [aspire otel traces command](../aspire-otel-traces/)
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ The following commands are available:
| [`aspire init`](../aspire-init/) | Stable | Initialize Aspire support in an existing solution or create a single-file AppHost. |
| [`aspire agent`](../aspire-agent/) | Stable | Manage AI agent integrations. |
| [`aspire new`](../aspire-new/) | Stable | Create an Aspire sample project from a template. |
| [`aspire otel`](../aspire-otel/) | Stable | View OpenTelemetry data (logs, spans, traces) from a running apphost. |
| [`aspire ps`](../aspire-ps/) | Stable | List running Aspire AppHost processes. |
| [`aspire publish`](../aspire-publish/) | Preview | Generates deployment artifacts for an Aspire apphost project. |
| [`aspire run`](../aspire-run/) | Stable | Run an Aspire apphost for local development. |
Expand Down