Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
21 changes: 21 additions & 0 deletions src/frontend/config/sidebar/dashboard.topics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,27 @@ export const dashboardTopics: StarlightSidebarTopicsUserConfig = {
'zh-CN': '数据功能',
},
items: [
{
label: 'Data persistence',
translations: {
da: 'Datapersistens',
de: 'Datenpersistenz',
en: 'Data persistence',
es: 'Persistencia de datos',
fr: 'Persistance des données',
hi: 'डेटा स्थायित्व',
id: 'Persistensi data',
it: 'Persistenza dei dati',
ja: 'データの永続化',
ko: '데이터 지속성',
'pt-BR': 'Persistência de dados',
ru: 'Сохранение данных',
tr: 'Veri kalıcılığı',
uk: 'Збереження даних',
'zh-CN': '数据持久性',
},
slug: 'dashboard/data-persistence',
},
{
label: 'AI coding agents',
translations: {
Expand Down
2 changes: 2 additions & 0 deletions src/frontend/src/content/docs/app-host/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ By default, the dashboard is automatically started by the AppHost. The dashboard
| `ASPIRE_DASHBOARD_TELEMETRY_OPTOUT` | `false` | Configures the dashboard to never send [usage telemetry](/dashboard/microsoft-collected-dashboard-telemetry/). |
| `ASPIRE_DASHBOARD_API_ENABLED` | `true` | Enables the dashboard [telemetry API](/dashboard/configuration/#api) (`/api/telemetry/*`) endpoints. The AppHost always sets this to `true`. |
| `ASPIRE_DASHBOARD_FORWARDEDHEADERS_ENABLED` | `false` | Enables the Forwarded headers middleware that replaces the scheme and host values on the Request context with the values coming from the `X-Forwarded-Proto` and `X-Forwarded-Host` headers. |
| `ASPIRE_DASHBOARD_PERSISTENCE_MODE` | `Run` | Configures [dashboard data persistence](/dashboard/data-persistence/). Valid values are `None`, `Run`, and `Resume`. The AppHost automatically sets this value to `Run`. |
| `ASPIRE_DASHBOARD_DATA_DIRECTORY` | `<ASPIRE_HOME>/dashboard` | Configures the root directory for persistent dashboard data. The directory must be writable by the account running the dashboard and have restrictive file-system permissions because it can contain sensitive data. |

## Internal

Expand Down
39 changes: 24 additions & 15 deletions src/frontend/src/content/docs/dashboard/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,30 +25,22 @@ How you configure the dashboard depends on whether it's started by the Aspire Ap

### Aspire AppHost

The AppHost automatically configures the dashboard, but you can override values if needed. The recommended way to configure the dashboard from the Aspire AppHost is by adding environment variables to the _launchSettings.json_ file.
The AppHost automatically configures the dashboard, but you can override values if needed. The recommended way to configure the dashboard from the AppHost is to add environment variables to a launch profile in _aspire.config.json_. This configuration works with both C# and TypeScript AppHosts.

```json title="launchSettings.json" {14}
```json title="aspire.config.json" {6}
Comment on lines +28 to +30
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"$schema": "https://aspire.dev/reference/cli/configuration/schema.json",
"profiles": {
"https": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"applicationUrl": "https://localhost:17134;http://localhost:15170",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"DOTNET_ENVIRONMENT": "Development",
"ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21030",
"ASPIRE_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22057",
"DASHBOARD__TELEMETRYLIMITS__MAXLOGCOUNT": "50000"
}
}
}
}
```

These launch settings increase the `Dashboard:TelemetryLimits:MaxLogCount` [telemetry limit](#telemetry-limits) to 50,000. The `:` delimiter must be replaced with double underscore (`__`) in environment variable names.
This profile increases the `Dashboard:TelemetryLimits:MaxLogCount` [telemetry limit](#telemetry-limits) to 50,000. The `:` delimiter must be replaced with double underscore (`__`) in environment variable names.

### Standalone dashboard

Expand Down Expand Up @@ -130,7 +122,7 @@ Alternatively, these same values could be configured using a JSON configuration
|--------|-------------|
| `ASPNETCORE_URLS`<br/>Default: `http://localhost:18888` | One or more HTTP endpoints through which the dashboard frontend is served. The frontend endpoint is used to view the dashboard in a browser. When the dashboard is launched by the Aspire AppHost this address is secured with HTTPS. Securing the dashboard with HTTPS is recommended. |
| `ASPIRE_DASHBOARD_OTLP_ENDPOINT_URL`<br/>Default: `http://localhost:18889` | The [OTLP/gRPC](https://opentelemetry.io/docs/specs/otlp/#otlpgrpc) endpoint. This endpoint hosts an OTLP service and receives telemetry using gRPC. When the dashboard is launched by the Aspire AppHost this address is secured with HTTPS. Securing the dashboard with HTTPS is recommended. |
| `ASPIRE_DASHBOARD_OTLP_HTTP_ENDPOINT_URL`<br/>Default: `http://localhost:18890` | The [OTLP/HTTP](https://opentelemetry.io/docs/specs/otlp/#otlphttp) endpoint. This endpoint hosts an OTLP service and receives telemetry using Protobuf over HTTP. When the dashboard is launched by the Aspire AppHost the OTLP/HTTP endpoint isn't configured by default. To configure an OTLP/HTTP endpoint with the AppHost, set an `ASPIRE_DASHBOARD_OTLP_HTTP_ENDPOINT_URL` env var value in _launchSettings.json_. Securing the dashboard with HTTPS is recommended. |
| `ASPIRE_DASHBOARD_OTLP_HTTP_ENDPOINT_URL`<br/>Default: `http://localhost:18890` | The [OTLP/HTTP](https://opentelemetry.io/docs/specs/otlp/#otlphttp) endpoint. This endpoint hosts an OTLP service and receives telemetry using Protobuf over HTTP. When the dashboard is launched by the Aspire AppHost the OTLP/HTTP endpoint isn't configured by default. To configure an OTLP/HTTP endpoint with the AppHost, set an `ASPIRE_DASHBOARD_OTLP_HTTP_ENDPOINT_URL` environment variable in an _aspire.config.json_ launch profile. Securing the dashboard with HTTPS is recommended. |
| `ASPIRE_DASHBOARD_UNSECURED_ALLOW_ANONYMOUS`<br/>Default: `false` | Configures the dashboard to not use authentication and accepts anonymous access. This setting is a shortcut to configuring `Dashboard:Frontend:AuthMode`, `Dashboard:Otlp:AuthMode`, and `Dashboard:Api:AuthMode` to `Unsecured`. See [Dashboard security considerations](/dashboard/security-considerations/#anonymous-access) for the security implications. |
| `ASPIRE_DASHBOARD_CONFIG_FILE_PATH`<br/>Default: `null` | The path for a JSON configuration file. If the dashboard is being run in a Docker container, then this is the path to the configuration file in a mounted volume. This value is optional. |
| `ASPIRE_DASHBOARD_FILE_CONFIG_DIRECTORY`<br/>Default: `null` | The directory where the dashboard looks for key-per-file configuration. This value is optional. |
Expand Down Expand Up @@ -221,6 +213,23 @@ export DASHBOARD__OTLP__ALLOWEDCERTIFICATES__0__THUMBPRINT="HEX_SHA256_THUMBPRIN
If no allowed certificates are configured then all certificates that pass [ASP.NET Core certificate validation](https://learn.microsoft.com/aspnet/core/security/authentication/certauth#configure-certificate-validation) can authenticate.
</Aside>

## Data persistence

The dashboard stores resources and telemetry in a SQLite database. Persistence behavior depends on how the dashboard is started: an AppHost-launched dashboard defaults to retaining separate application runs, while the standalone dashboard defaults to deleting its temporary database when it stops. The [application name](#other) is used to partition persisted data.

| Option | Environment variable | Description |
|--------|----------------------|-------------|
| `Dashboard:Data:Directory`<br/>Default: `<ASPIRE_HOME>/dashboard` | `ASPIRE_DASHBOARD_DATA_DIRECTORY` | The root directory for persistent dashboard data. The default `ASPIRE_HOME` is the _.aspire_ directory in the current user's profile. This option doesn't affect the temporary directory used by `None` mode. |
| `Dashboard:Data:PersistenceMode`<br/>Default: `None` | `ASPIRE_DASHBOARD_PERSISTENCE_MODE` | The persistence mode. The AppHost automatically sets it to `Run`. Valid values are `None`, `Run`, and `Resume`. |

The `aspire dashboard run` command also provides `--application-name` and `--persistence` options. For example, the following command reopens the same standalone database after a restart:

```bash title="Aspire CLI"
aspire dashboard run --application-name my-app --persistence Resume
```

For a comparison of the modes and details about run history, storage layout, retention, and schema compatibility, see [Aspire dashboard data persistence](/dashboard/data-persistence/).

## OTLP CORS

Cross-origin resource sharing (CORS) can be configured to allow browser apps to send telemetry to the dashboard.
Expand Down Expand Up @@ -282,7 +291,7 @@ The resource service client authentication is configured with `Dashboard:Resourc

### Telemetry limits

Telemetry is stored in memory. To avoid excessive memory usage, the dashboard limits stored telemetry. Log, trace, and metric retention limits evict the oldest stored values when full; attribute and span-event limits truncate incoming data, and the resource limit rejects telemetry for new resources after the limit is reached.
Telemetry is stored in SQLite. To bound the amount of retained telemetry, the dashboard applies limits to each database. Log, trace, and metric retention limits evict the oldest stored values when full; attribute and span-event limits truncate incoming data, and the resource limit rejects telemetry for new resources after the limit is reached.

Telemetry limits have different scopes depending upon the telemetry type:

Expand All @@ -303,7 +312,7 @@ Telemetry limits have different scopes depending upon the telemetry type:

| Option | Description |
|--------|-------------|
| `Dashboard:ApplicationName`<br/>Default: `Aspire` | The application name to be displayed in the UI. This applies only when no resource service URL is specified. When a resource service exists, the service specifies the application name. |
| `Dashboard:ApplicationName`<br/>Default: `Aspire` | The logical application name used to partition persisted data. The AppHost supplies its application name automatically. Set it with the `ASPIRE_DASHBOARD_APPLICATION_NAME` environment variable. |
| `Dashboard:UI:DisableResourceGraph`<br/>Default: `false` | Disables displaying the resource graph UI in the dashboard. |
| `Dashboard:UI:DisableImport`<br/>Default: `false` | Disables the telemetry import UI in the dashboard. |
| `Dashboard:UI:DisableAgentHelp`<br/>Default: `false` | Disables the **AI Agents** button in the dashboard header. When `false`, a button is shown in the header that opens a dialog with instructions for using AI coding agents with the dashboard. |
Expand Down
Loading
Loading