Repository navigation
[docs] Document timestamp search qualifier for telemetry filtering #1181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
James Newton-King (JamesNK)
merged 10 commits into
release/13.5
from
docs/timestamp-filter-qualifier-17816-7b6dbcc69cf434a4
Jun 6, 2026
Merged
Changes from 3 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
00df90e
docs: document timestamp search qualifier for telemetry filtering
aspire-repo-bot[bot] c1617ee
Move timestamp qualifier docs to shared CLI references
Copilot 2a30024
Fix severity casing in timestamp search example
Copilot 1a2f9d3
Apply suggestions from code review
JamesNK 23d9295
Apply suggestion from @JamesNK
JamesNK cc63ccf
Apply suggestion from @JamesNK
JamesNK 5456a75
docs: clarify date-only timestamp search values
Copilot 382df14
Apply suggestion from @JamesNK
JamesNK 0ead734
Apply suggestion from @JamesNK
JamesNK ff90c4c
Update timestamp example dates to use 2026
JamesNK File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,10 +28,26 @@ Search queries support free-text fragments, field qualifiers, attribute qualifie | |
| | `field:"value with spaces"` | Quoted field qualifier value | `message:"connection failed"` | | ||
| | `@attr:value` | Attribute qualifier — matches custom span/log attributes | `@http.method:GET` | | ||
| | `-field:value` / `-@attr:value` | Negated qualifier — excludes matches | `-severity:debug` | | ||
| | `field:>N` / `field:>=N` / `field:<N` / `field:<=N` | Numeric comparison | `duration:>100` | | ||
| | `field:>value` / `field:>=value` / `field:<value` / `field:<=value` | Comparison for supported numeric and timestamp fields | `duration:>100` | | ||
|
|
||
| All terms are AND'd: every fragment and qualifier must independently match. | ||
|
|
||
| ## Timestamp qualifier | ||
|
|
||
| Use the `timestamp` field qualifier to narrow structured logs, traces, and spans to a specific date/time range. The qualifier accepts ISO 8601 date/time strings together with a comparison operator: | ||
|
|
||
| ```bash title="Aspire CLI" | ||
| aspire otel logs --search "timestamp:>2024-01-15T09:30:00" | ||
| aspire otel traces --search "timestamp:<=2024-06-01T12:00:00Z" | ||
| aspire otel spans --search "timestamp:>=2024-03-01T08:30:00+05:00" | ||
|
JamesNK marked this conversation as resolved.
Outdated
|
||
| ``` | ||
|
|
||
| The supported comparison operators are `>`, `>=`, `<`, and `<=`. Timestamp values follow these timezone rules: | ||
|
|
||
| - A value with no timezone suffix (for example `2024-01-15T09:30:00`) is treated as local time on the dashboard server. | ||
| - A value with a UTC offset (for example `+05:00`) is adjusted to UTC before comparison. | ||
|
JamesNK marked this conversation as resolved.
Outdated
|
||
| - A value with the `Z` suffix is treated as UTC directly. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Copilot Mention that time is optional. An ISO date by itself can be used as a value
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Addressed in 38fb43f. |
||
|
|
||
| ## Console logs | ||
|
|
||
| Matches against log line text content and resource name. Only free-text is supported (no structured qualifiers). | ||
|
|
@@ -45,36 +61,39 @@ aspire logs --follow --search "\"connection error\"" | |
|
|
||
| Supports free-text and structured qualifiers. Free-text matches against message, resource name, scope, trace/span IDs, severity, and all attribute keys/values. | ||
|
|
||
| Available field qualifiers: `severity`, `resource`, `scope`, `message`, `trace-id`, `span-id`, `event`. | ||
| Available field qualifiers: `severity`, `resource`, `scope`, `message`, `trace-id`, `span-id`, `event`, `timestamp`. | ||
|
|
||
| ```bash title="Aspire CLI" | ||
| aspire otel logs --search "severity:error \"connection failed\"" | ||
| aspire otel logs --search "resource:api -severity:debug" | ||
| aspire otel logs --search "scope:Microsoft.EntityFrameworkCore" | ||
| aspire otel logs --search "timestamp:>=2024-06-01T12:00:00Z severity:error" | ||
|
JamesNK marked this conversation as resolved.
Outdated
|
||
| ``` | ||
|
|
||
| ## Traces | ||
|
|
||
| Supports free-text and structured qualifiers. Free-text matches against trace name, resource name, and all span fields within the trace. | ||
|
|
||
| Available field qualifiers: `name`, `resource`, `trace-id`, `status`, `duration`. | ||
| Available field qualifiers: `name`, `resource`, `trace-id`, `status`, `duration`, `timestamp`. | ||
|
|
||
| ```bash title="Aspire CLI" | ||
| aspire otel traces --search "checkout" | ||
| aspire otel traces --search "status:error duration:>500" | ||
| aspire otel traces --search "@http.status_code:500" | ||
| aspire otel traces --search "timestamp:>2024-01-15T09:30:00 status:error" | ||
| ``` | ||
|
|
||
| ## Spans | ||
|
|
||
| Supports free-text and structured qualifiers. Free-text matches against span name, resource name, scope, trace/span IDs, status, kind, and all attribute keys/values. | ||
|
|
||
| Available field qualifiers: `name`, `resource`, `scope`, `status`, `kind`, `trace-id`, `span-id`, `duration`. | ||
| Available field qualifiers: `name`, `resource`, `scope`, `status`, `kind`, `trace-id`, `span-id`, `duration`, `timestamp`. | ||
|
|
||
| ```bash title="Aspire CLI" | ||
| aspire otel spans --search "@http.method:GET duration:>100 status:error" | ||
| aspire otel spans --search "@db.system:postgresql" | ||
| aspire otel spans --search "-kind:internal" | ||
| aspire otel spans --search "timestamp:>=2024-03-01T08:30:00+05:00 kind:server" | ||
|
JamesNK marked this conversation as resolved.
Outdated
|
||
| ``` | ||
|
|
||
| ## See also | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.