Increase dashboard console log, structured log, and trace limits - #20169
James Newton-King (JamesNK) wants to merge 3 commits into
Conversation
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 20169Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 20169" |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🟡 Changes recommended
Producer limits, default-value test coverage, and specification documentation remain inconsistent.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Increases default dashboard retention limits for console logs, structured logs, and traces from 10,000 to 100,000.
Changes:
- Updates the three dashboard retention defaults.
- Updates README configuration documentation.
File summaries
| File | Summary |
|---|---|
src/Aspire.Dashboard/README.md |
Documents the increased defaults; the persistence specification still requires an update. |
src/Aspire.Dashboard/Configuration/DashboardOptions.cs |
Updates retention defaults; producer-side limits and focused default-value tests still require changes. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 3
- Review effort level: Lite (auto)
Note
Copilot is running an experiment and ran this review at Lite.
There was a problem hiding this comment.
🔵 Needs a closer look
Address the two moderate findings before approval.
Review details
Suppressed comments (2)
src/Aspire.Dashboard/Configuration/DashboardOptions.cs:252
- These new defaults are user-visible behavior, but
DashboardOptionsTestsonly tests validation and explicit overrides; it never verifies the default values. Add a focused default-options test coveringMaxConsoleLogCount,MaxLogCount, andMaxTraceCount, so a future change cannot silently diverge from the documented 100,000 defaults.
/// </remarks>
src/Aspire.Dashboard/Configuration/DashboardOptions.cs:252
- Raising only the dashboard
LogEntriescapacity does not make 100,000 console lines available when the dashboard reconnects or first subscribes late. The resource-service path used byDashboardService.SubscribeConsoleLogsreplays fromResourceLoggerService.ResourceLoggerState, whose_inMemoryEntriesand_backlogare still hard-capped at 10,000 (src/Aspire.Hosting/ApplicationModel/ResourceLoggerService.cs:376-384), so the new default can still lose all but the latest 10,000 before they reach the dashboard. Increase that upstream cap in the same change, or explicitly document the publish-side limit.
/// </remarks>
- Files reviewed: 9/9 changed files
- Comments generated: 0 new
- Review effort level: Lite (auto)
Note
Copilot is running an experiment and ran this review at Lite.
Tests selector10 / 99 PR test projects · 3 PR jobs, from 7 changed files. Selected PR test projects (10 / 99)
Selected PR jobs (3)
How these were chosen — grouped by what changed
🔧 📦 affected project 📦 affected project 🧪 🧪 🧪 Job reasons
Selection computed for commit |
There was a problem hiding this comment.
🟢 Approval recommended
The transactional retention logic is consistent with existing telemetry cleanup patterns and has focused multi-resource coverage.
Review details
- Files reviewed: 9/9 changed files
- Comments generated: 0 new
- Review effort level: Balanced (auto)
Note
Copilot is running an experiment and ran this review at Balanced.
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Description
Increase the dashboard's default console log, structured log, and trace retention limits from 10,000 to 100,000 so more diagnostic history remains available during longer runs.
Persisted console logs now use
Dashboard:Frontend:MaxConsoleLogCountas a global database limit across resources. Console-log writes trim the earliest inserted rows in the same transaction when the database exceeds the configured limit. Structured logs and traces continue to evict their oldest timestamped data usingDashboard:TelemetryLimits:MaxLogCountandDashboard:TelemetryLimits:MaxTraceCount.The dashboard README and persistence specification document the new defaults and bounded console-log persistence behavior.
User-facing usage
The following settings now default to 100,000 and remain configurable:
Dashboard:Frontend:MaxConsoleLogCountDashboard:TelemetryLimits:MaxLogCountDashboard:TelemetryLimits:MaxTraceCountMaxConsoleLogCountlimits both the in-memory viewer and persisted console logs. The database limit is shared across resources.Validation:
SqliteResourceRepositoryTestsandDashboardSqliteDatabaseTestspassed (31 tests), including focused multi-resource console-log eviction coverage.Fixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?