Persist Dashboard telemetry and run history in SQLite#18768
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 18768Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 18768" |
00f9f9e to
bd4214e
Compare
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Description
Dashboard telemetry previously existed only for the lifetime of the Dashboard process, which made it difficult to inspect an application after it stopped or compare behavior across runs. This change introduces SQLite-backed resource and telemetry repositories so the active run and completed runs can be queried efficiently from the Dashboard.
Highlights
None,Runs, andAppendpersistence modes. AppHost Dashboards default toRuns, which stores runs separately, prunes older runs, handles abandoned or in-use run directories, and opens historical databases read-only.Currentand a previous run without reloading the page. Historical views disable mutation controls and freeze metric charts at the latest stored timestamp.peer.service=dashboard.dbattributes. ASP.NET Core request activities and SQLite activities are exported through OTLP whenOTEL_EXPORTER_OTLP_ENDPOINTis configured.User-facing usage
Use the run selector in the Dashboard header to choose
Currentor a previous run identified by its local start time. The resources, console logs, structured logs, traces, and metrics pages then show data from that run. Previous runs are read-only.Screenshots / Recordings
TODO: Capture the run selector and a selected historical run showing disabled mutation controls and a frozen metric chart.
Security considerations
Persisted Dashboard data can include resource properties, logs, trace attributes, metric dimensions, and other application-supplied telemetry. The database inherits access controls from its containing Dashboard data directory, which must be protected from undesirable accounts. SQLite self-telemetry includes SQL query text and is sent to the configured OTLP endpoint when Dashboard self-export is enabled. This change does not expose a new inbound network endpoint. No threat model or security review has been completed for this change.
Validation
dotnet test --project tests/Aspire.Dashboard.Tests/Aspire.Dashboard.Tests.csproj --configuration Release --no-launch-profile -- --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"(1,740 passed)dotnet test --project tests/Aspire.Dashboard.Components.Tests/Aspire.Dashboard.Components.Tests.csproj --no-launch-profile -- --filter-not-trait "quarantined=true" --filter-not-trait "outerloop=true"(200 passed)dotnet build src/Aspire.Dashboard/Aspire.Dashboard.csproj --no-restoreaspire dashboard run.Checklist
<remarks />and<code />elements on your triple slash comments?