Skip to content

Add search and filter telemetry sub-section to CLI overview#1121

Open
JamesNK wants to merge 3 commits into
release/13.4from
docs/cli-overview-search-filter
Open

Add search and filter telemetry sub-section to CLI overview#1121
JamesNK wants to merge 3 commits into
release/13.4from
docs/cli-overview-search-filter

Conversation

@JamesNK
Copy link
Copy Markdown
Member

@JamesNK JamesNK commented May 29, 2026

Adds a new "Search and filter telemetry" sub-section under "Inspect runtime data" in the CLI overview page.

Documents the --search option for both console logs (aspire logs) and structured telemetry (aspire otel logs/traces/spans), including:

  • Free-text matching (AND logic, quoted phrases)
  • Structured field:value qualifiers for logs and spans/traces
  • Custom attribute qualifiers (@attr:value)
  • Negation (-field:value)
  • Comparison operators (duration:>100)

Content based on https://github.com/microsoft/aspire-skills/blob/main/skills/aspire-monitoring/references/monitoring.md#filtering

Copilot AI review requested due to automatic review settings May 29, 2026 11:14
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new "Search and filter telemetry" sub-section to the CLI overview page that documents the --search option for aspire logs and aspire otel logs/traces/spans, covering free-text matching, structured field:value qualifiers, custom attribute qualifiers, negation, and comparison operators.

Changes:

  • Adds a sub-section under "Inspect runtime data" describing console log search semantics.
  • Documents structured telemetry search syntax with field lists for logs and spans/traces, plus examples.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +208 to +234
The `--search` option filters output by matching text against log content and trace/span fields. Multiple words are AND'd—all fragments must match. Use `"quoted phrases"` for multi-word fragments.

#### Console logs (`aspire logs --search`)

Matches against log line text content and resource name. Only free-text is supported (no structured qualifiers).

```bash title="Aspire CLI"
aspire logs redis --search "timeout"
aspire logs --follow --search "\"connection error\""
```

#### Structured telemetry (`aspire otel logs/traces/spans --search`)

Supports free-text and structured qualifiers in a single query. Free-text matches against message, resource name, scope, trace/span IDs, severity/status, and all attribute keys/values.

Structured qualifiers filter on specific fields with `field:value` syntax:

- **Log fields:** `severity`, `resource`, `scope`, `message`, `trace-id`, `span-id`, `event`
- **Span/Trace fields:** `name`, `resource`, `scope`, `status`, `kind`, `trace-id`, `span-id`, `duration`
- **Custom attributes:** `@http.method:GET`, `@db.system:redis`
- **Negation:** `-severity:debug`, `-@db.system:redis`
- **Comparison:** `duration:>100`, `duration:>=50`

```bash title="Aspire CLI"
aspire otel logs --search "severity:error \"connection failed\""
aspire otel spans --search "@http.method:GET duration:>100 status:error"
aspire otel logs --search "resource:api -severity:debug"
@JamesNK JamesNK force-pushed the docs/cli-overview-search-filter branch 3 times, most recently from d85549f to 434198f Compare May 29, 2026 11:25
@IEvangelist
Copy link
Copy Markdown
Member

IEvangelist commented May 29, 2026

Hey @JamesNK, just double checking, but is this intentionally targeting main? I thought this was a 13.4 feature.

@JamesNK JamesNK force-pushed the docs/cli-overview-search-filter branch 2 times, most recently from 77f69c9 to 6485c61 Compare May 29, 2026 14:43
@JamesNK JamesNK force-pushed the docs/cli-overview-search-filter branch from 6485c61 to 6e44189 Compare May 29, 2026 14:46
@JamesNK JamesNK force-pushed the docs/cli-overview-search-filter branch from 6e44189 to 440a8d6 Compare May 29, 2026 14:49
@JamesNK JamesNK changed the base branch from main to release/13.4 May 29, 2026 14:49
@JamesNK
Copy link
Copy Markdown
Member Author

JamesNK commented May 29, 2026

@IEvangelist Ready for review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants