Skip to content
Open
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
4 changes: 4 additions & 0 deletions src/frontend/config/sidebar/docs.topics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ export const docsTopics: StarlightSidebarTopicsUserConfig = {
label: "What's new",
collapsed: true,
items: [
{
label: 'Aspire 13.5',
slug: 'whats-new/aspire-13-5',
},
{
label: 'Aspire 13.4',
slug: 'whats-new/aspire-13-4',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ Use persistent lifetime for resources that are expensive to initialize, need sta
Persistent resources are automatically recreated when the AppHost detects meaningful configuration changes. If the configuration differs, the resource is recreated with the new settings.
:::

Persistent resources default to proxyless endpoints so a stable local endpoint can remain reachable after the AppHost stops. You can still configure endpoint proxy behavior explicitly. For example, set `isProxied: true` or `IsProxied = true` when you need Aspire's proxy for a specific endpoint, or disable endpoint proxy support when you intentionally want every endpoint on a resource to be proxyless. Persistent executable endpoints must have a concrete `port` or `targetPort`; automatically persisted random executable ports aren't supported.
Persistent containers use proxied endpoints by default, just like session containers. The proxy runs only while the AppHost is running, so the proxy address isn't reachable after the AppHost stops. Persistent executables and projects default to proxyless endpoints so their direct addresses stay stable and reachable even after the AppHost stops.

You can still configure endpoint proxy behavior explicitly on any persistent resource. Set `isProxied: false` on an individual endpoint, or call `WithEndpointProxySupport(false)` to make every endpoint on a resource proxyless. Persistent executable endpoints must have a concrete `port` or `targetPort`; automatically persisted random executable ports aren't supported. For proxyless container endpoints with only a `targetPort`, Aspire immediately uses the target port as the allocated host port.

:::danger[Persistent container ≠ persistent data]
Persistent container lifetime doesn't guarantee data durability. For details, see [Container lifetime vs. data durability](#container-lifetime-vs-data-durability).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ The inner loop is the process of developing and testing your app locally before

- **Endpoints/Endpoint configurations**: Endpoints are the connections between your app and the services it depends on, such as databases, message queues, or APIs. Endpoints provide information such as the service name, host port, scheme, and environment variable. Aspire can create endpoints automatically from resource configuration, and you can also add them explicitly by calling `WithEndpoint`.
- **Proxies**: Aspire automatically launches a proxy for each proxied service binding you add to your app, and assigns a port for the proxy to listen on. The proxy then forwards the requests to the port that your app listens on, which might be different from the proxy port. This way, you can avoid port conflicts and access your app and services using consistent and predictable URLs.
- **Proxyless endpoints**: Endpoints with `IsProxied` set to `false` connect directly to the resource instead of routing through an Aspire-managed proxy. Starting in Aspire 13.4, endpoints on persistent resources are proxyless by default. Proxyless endpoints must specify a target port so Aspire knows which port the resource listens on.
- **Proxyless endpoints**: Endpoints with `IsProxied` set to `false` connect directly to the resource instead of routing through an Aspire-managed proxy. Starting in Aspire 13.4, endpoints on persistent executables and projects are proxyless by default. Persistent containers use proxied endpoints by default, the same as session containers. Proxyless endpoints must specify a target port so Aspire knows which port the resource listens on.
- **Container networks**: Aspire creates and manages dedicated networks for container resources so containers can discover and communicate with each other during local development.

## How endpoints work
Expand Down Expand Up @@ -230,7 +230,9 @@ The underlying service still listens on its own port, and Aspire makes that allo

Most endpoints are proxied by default. A proxyless endpoint skips the Aspire-managed proxy and exposes the resource's listener directly. Use a proxyless endpoint when a proxy would interfere with the resource's lifetime or networking behavior.

Starting in Aspire 13.4, endpoints on persistent resources are proxyless by default. This lets the persistent resource keep using its direct endpoint across AppHost runs instead of depending on a new proxy instance each time. This also ensures that the ports your service is reachable on stay stable whether the AppHost is running or not.
Starting in Aspire 13.4, endpoints on persistent executables and projects are proxyless by default. This lets the persistent resource keep using its direct endpoint across AppHost runs instead of depending on a new proxy instance each time. This also ensures that the ports your service is reachable on stay stable whether the AppHost is running or not. Persistent containers use proxied endpoints by default, the same as session containers, so integrations that depend on endpoint allocation before startup continue to work.

For proxyless container endpoints, Aspire resolves the host port immediately when only a `targetPort` is specified — there is no deferred allocation. For example, `.WithEndpoint(targetPort: 6379, isProxied: false)` allocates host port `6379` right away.

Because there's no proxy to listen on one port and forward to another, every proxyless endpoint must include a target port. The target port tells Aspire which port the resource listens on. You can also set `port` when you need a specific host port, but `targetPort` is still required for proxyless endpoints.

Expand Down Expand Up @@ -405,7 +407,7 @@ The `AllocatedEndpoint` property allows you to get or set the endpoint for a ser
on.
</Aside>

The `Name` property identifies the service, whereas the `Port` and `TargetPort` properties specify the desired and listening ports, respectively. `TargetPort` is required for proxyless endpoints, including endpoints with `IsProxied` set to `false` and, starting in Aspire 13.4, endpoints on persistent resources by default.
The `Name` property identifies the service, whereas the `Port` and `TargetPort` properties specify the desired and listening ports, respectively. `TargetPort` is required for proxyless endpoints, including endpoints with `IsProxied` set to `false` and, starting in Aspire 13.4, endpoints on persistent executables and projects by default.

For network communication, the `Protocol` property supports **TCP** and **UDP**, with potential for more in the future, and the `Transport` property indicates the transport protocol (**HTTP**, **HTTP2**, **HTTP3**). Lastly, if the service is URI-addressable, the `UriScheme` property provides the URI scheme for constructing the service URI.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -663,9 +663,11 @@ await builder.build().run();
</TabItem>
</Tabs>

When the AppHost starts up, the local foundry service is also started. This requires the local machine to have [Foundry Local](https://learn.microsoft.com/azure/ai-foundry/foundry-local/get-started) installed and running.
When the AppHost starts, Aspire automatically starts the Foundry Local service using the `foundry` CLI (`foundry service start`). It then discovers the service endpoint, downloads and loads the specified models via CLI commands, and stops the service (`foundry service stop`) when the AppHost shuts down or is disposed. You do not need to pre-start Foundry Local manually.

The `RunAsFoundryLocal` method configures the resource to run as an emulator. It downloads and loads the specified models locally. The method provides health checks for the local service and automatically manages the Foundry Local lifecycle.
This requires the `foundry` CLI to be installed and available on `PATH`. For installation instructions, see [Foundry Local get started](https://learn.microsoft.com/azure/ai-foundry/foundry-local/get-started).

The `RunAsFoundryLocal` method configures the resource to use the local service. It downloads and loads the specified models locally, provides health checks for the local service, and fully manages the Foundry Local lifecycle — including start and stop — through the `foundry` CLI.

<Aside type="caution">
Foundry Projects aren't supported when the parent Foundry resource uses
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,10 @@ The following options are available:
| `"quoted phrase"` | Single fragment containing spaces |
| `field:value` | Field qualifier — value must match the named field |
| `-field:value` | Negated qualifier — excludes matches |
| `field:>value` / `field:>=value` / `field:<value` / `field:<=value` | Comparison for supported timestamp fields |
| `@attr:value` | Attribute qualifier — matches custom log attributes |

Supported fields for structured logs: `severity`, `resource`, `scope`, `message`, `trace-id`, `span-id`, `event`.
Supported fields for structured logs: `severity`, `resource`, `scope`, `message`, `trace-id`, `span-id`, `event`, `timestamp`.

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

Expand Down Expand Up @@ -133,6 +134,12 @@ The following options are available:
aspire otel logs --search "scope:Microsoft.EntityFrameworkCore severity:Warning"
```

- Filter logs by timestamp:

```bash title="Aspire CLI"
aspire otel logs --search "timestamp:>=2026-06-01T12:00:00 severity:error"
```

- View logs from a standalone dashboard using the login URL (token is automatically exchanged for an API key):

```bash title="Aspire CLI"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ The following options are available:
| `"quoted phrase"` | Single fragment containing spaces |
| `field:value` | Field qualifier — value must match the named field |
| `-field:value` | Negated qualifier — excludes matches |
| `field:>N` / `field:>=N` / `field:<N` / `field:<=N` | Comparison for numeric fields |
| `field:>value` / `field:>=value` / `field:<value` / `field:<=value` | Comparison for supported `duration` and `timestamp` fields |
| `@attr:value` | Attribute qualifier — matches custom span attributes |

Supported fields for spans: `resource`, `name`, `span-id`, `trace-id`, `status`, `kind`, `duration`.
Supported fields for spans: `resource`, `name`, `span-id`, `trace-id`, `status`, `kind`, `duration`, `timestamp`.

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

Expand Down Expand Up @@ -134,6 +134,12 @@ The following options are available:
aspire otel spans --search "@db.system:postgresql"
```

- Filter spans by timestamp:

```bash title="Aspire CLI"
aspire otel spans --search "timestamp:>=2026-03-01T08:30:00 kind:server"
```

- View spans from a standalone dashboard using the login URL (token is automatically exchanged for an API key):

```bash title="Aspire CLI"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ The following options are available:
| `"quoted phrase"` | Single fragment containing spaces |
| `field:value` | Field qualifier — value must match the named field |
| `-field:value` | Negated qualifier — excludes matches |
| `field:>N` / `field:>=N` / `field:<N` / `field:<=N` | Comparison for numeric fields |
| `field:>value` / `field:>=value` / `field:<value` / `field:<=value` | Comparison for supported `duration` and `timestamp` fields |
| `@attr:value` | Attribute qualifier — matches custom span attributes |

Supported fields for traces: `resource`, `name`, `trace-id`, `status`, `duration`.
Supported fields for traces: `resource`, `name`, `trace-id`, `status`, `duration`, `timestamp`.

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

Expand Down Expand Up @@ -132,6 +132,12 @@ The following options are available:
aspire otel traces --search "@http.status_code:500"
```

- Filter traces by timestamp:

```bash title="Aspire CLI"
aspire otel traces --search "timestamp:>2026-01-15T09:30:00 status:error"
```

- View traces from a standalone dashboard using the login URL (token is automatically exchanged for an API key):

```bash title="Aspire CLI"
Expand Down
29 changes: 25 additions & 4 deletions src/frontend/src/content/docs/reference/cli/search-filter.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,28 @@ 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 or date/time strings together with a comparison operator:

```bash title="Aspire CLI"
aspire otel logs --search "timestamp:>2026-01-15T09:30:00"
aspire otel traces --search "timestamp:<=2026-06-01T12:00:00Z"
aspire otel spans --search "timestamp:>=2026-01-01 timestamp:<2027-01-01"
```

The supported comparison operators are `>`, `>=`, `<`, and `<=`.

Timestamp values are internally stored with UTC. The `timestamp` value is converted to UTC using these timezone rules:

- A value with no timezone suffix (for example `2026-01-15` or `2026-01-15T09:30:00`) is treated as local time on the dashboard server and adjusted to UTC before comparison.
- A value with a UTC offset (for example `2026-06-01T12:00:00+05:00`) is adjusted to UTC before comparison.
- A value with the `Z` suffix is treated as UTC directly.

## Console logs

Matches against log line text content and resource name. Only free-text is supported (no structured qualifiers).
Expand All @@ -45,36 +63,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:>=2026-06-01T12:00:00 severity:error"
```

## 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:>2026-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:>=2026-03-01T08:30:00 kind:server"
```

## See also
Expand Down
11 changes: 6 additions & 5 deletions src/frontend/src/content/docs/whats-new/aspire-13-4.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -473,10 +473,11 @@ Persistent lifetimes now extend beyond containers to executables and projects. C
<Aside type="caution">
The shared persistent and session lifetime APIs are experimental and emit
the `ASPIREPERSISTENCE001` diagnostic, which C# callers must suppress to use
them. Persistent resources default to proxyless endpoints, must use concrete
ports for executables, don't support replicas, and aren't compatible with
Aspire IDE debugging sessions. The existing container-specific
`WithLifetime(ContainerLifetime.Persistent)` API is unchanged.
them. Persistent executables and projects default to proxyless endpoints,
must use concrete ports for executables, don't support replicas, and aren't
compatible with Aspire IDE debugging sessions. Persistent containers use
proxied endpoints by default, the same as session containers. The existing
container-specific `WithLifetime(ContainerLifetime.Persistent)` API is unchanged.
</Aside>

<LearnMore>
Expand Down Expand Up @@ -779,7 +780,7 @@ Re-run `aspire run` (or your code-generation step) to regenerate references, and

#### Persistent executable and project lifetimes

Support for persistent lifetimes on executables and projects updates the underlying DCP executable model (new `persistent`, `start`, and `stop` fields). Persistent resources default to proxyless endpoints, require concrete ports for executables, don't support replicas, and aren't compatible with Aspire IDE debugging sessions.
Support for persistent lifetimes on executables and projects updates the underlying DCP executable model (new `persistent`, `start`, and `stop` fields). Persistent executables and projects default to proxyless endpoints, require concrete ports for executables, don't support replicas, and aren't compatible with Aspire IDE debugging sessions. Persistent containers use proxied endpoints by default, matching session container behavior, so integrations that depend on endpoint allocation before startup work correctly without changes.

If you adopt `WithPersistentLifetime()`, review endpoint and port configuration. Tooling pinned to the previous DCP executable schema may need to be updated. See [Configure resource lifetimes](/app-host/resource-lifetimes/).

Expand Down
Loading
Loading