microsoft / microsoft/aspire

Persist Dashboard console logs independently of UI subscriptions

Open
#18,823 2 comments 0 reactions 0 assignees View on GitHub
area-dashboard triage:bot-seen
Dominant language
C#
Stars
6.3k
Forks
991
Avg merge
2d 15h
Merged PRs (30d)
196

Description

## Summary

Dashboard console-log persistence is currently demand-driven. A resource's logs are written to the run database only while `DashboardClient.SubscribeConsoleLogs` or `DashboardClient.GetConsoleLogs` is being consumed, typically because the Console Logs page was opened or telemetry export requested the logs.

As a result:

- Historical runs can omit console logs for resources that were never viewed or exported during the run.
- Current-run export reads the persisted snapshot and can omit logs that were not previously captured.
- The historical Console Logs UI must display a notice when logs were not captured for the selected run.

## Proposed improvement

Add an always-on resource console-log ingestion path that is independent of UI and export subscriptions. Persist each resource's console logs for the lifetime of the Dashboard run while preserving the existing retention limits and avoiding duplicate ingestion when UI subscribers are present.

## Acceptance criteria

- Console logs are persisted without opening the Console Logs page or exporting telemetry.
- Historical runs contain console logs for all resources that emitted them while the Dashboard was connected.
- Current-run export includes available console logs without requiring prior UI access.
- Multiple UI/export consumers do not duplicate persisted log entries or create redundant upstream subscriptions.
- Existing console-log limits, pause semantics, cancellation, reconnect behavior, and run isolation remain correct.
- Focused tests cover unopened-resource persistence, export before UI access, reconnect behavior, and deduplication.

Related to #18768.

Contributor guide

Open the contributing guide

Research direction

Start with DashboardClient.SubscribeConsoleLogs and GetConsoleLogs, then trace how resource logs reach the run database and how historical and current-run export reads them. Add the always-on ingestion path while preserving limits, pause, cancellation, reconnect, run isolation, and deduplication; focused tests should cover unopened resources, export before UI access, reconnects, and multiple consumers.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.