Skip to content

Increase dashboard console log, structured log, and trace limits - #20169

Open
James Newton-King (JamesNK) wants to merge 3 commits into
mainfrom
increase-dashboard-data-limits
Open

James Newton-King (JamesNK) wants to merge 3 commits into
mainfrom
increase-dashboard-data-limits

Conversation

@JamesNK

@JamesNK James Newton-King (JamesNK) commented Sep 16, 2026

Copy link
Copy Markdown
Member

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:MaxConsoleLogCount as 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 using Dashboard:TelemetryLimits:MaxLogCount and Dashboard: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:MaxConsoleLogCount
  • Dashboard:TelemetryLimits:MaxLogCount
  • Dashboard:TelemetryLimits:MaxTraceCount

MaxConsoleLogCount limits both the in-memory viewer and persisted console logs. The database limit is shared across resources.

Validation: SqliteResourceRepositoryTests and DashboardSqliteDatabaseTests passed (31 tests), including focused multi-resource console-log eviction coverage.

Fixes # (issue)

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 20169

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 20169"

@github-actions

This comment has been minimized.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.

Comment thread src/Aspire.Dashboard/Configuration/DashboardOptions.cs
Comment thread src/Aspire.Dashboard/Configuration/DashboardOptions.cs
Comment thread src/Aspire.Dashboard/README.md

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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 DashboardOptionsTests only tests validation and explicit overrides; it never verifies the default values. Add a focused default-options test covering MaxConsoleLogCount, MaxLogCount, and MaxTraceCount, 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 LogEntries capacity does not make 100,000 console lines available when the dashboard reconnects or first subscribes late. The resource-service path used by DashboardService.SubscribeConsoleLogs replays from ResourceLoggerService.ResourceLoggerState, whose _inMemoryEntries and _backlog are 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.

@github-actions

Copy link
Copy Markdown
Contributor

Tests selector

10 / 99 PR test projects · 3 PR jobs, from 7 changed files.

Selected PR test projects (10 / 99)

Aspire.Cli.EndToEnd.Tests, Aspire.Dashboard.Components.Tests, Aspire.Dashboard.Tests, Aspire.Hosting.DotnetTool.Tests, Aspire.Hosting.JavaScript.Tests, Aspire.Hosting.RemoteHost.Tests, Aspire.Hosting.Testing.Tests, Aspire.Managed.Tests, Aspire.Playground.Tests, Aspire.Templates.Tests

Selected PR jobs (3)

cli-starter-validation, extension-e2e, polyglot


How these were chosen — grouped by what changed

⚠️ 7 of the 10 selected test projects come from a single change — src/Aspire.Dashboard/Configuration/DashboardOptions.cs.

🔧 src/Aspire.Dashboard/Configuration/DashboardOptions.cs (changed source)
7 via the project graph: Aspire.Dashboard.Components.Tests, Aspire.Hosting.DotnetTool.Tests (2 hops), Aspire.Hosting.JavaScript.Tests, Aspire.Hosting.RemoteHost.Tests (2 hops), Aspire.Hosting.Testing.Tests, Aspire.Managed.Tests (2 hops), Aspire.Playground.Tests (2 hops)

📦 affected project Aspire.Dashboard
1 test: Aspire.Templates.Tests

📦 affected project Aspire.Managed
1 test: Aspire.Cli.EndToEnd.Tests

🧪 tests/Aspire.Dashboard.Tests/Model/DashboardSqliteDatabaseTests.cs (changed test)
1 directly: Aspire.Dashboard.Tests

🧪 tests/Aspire.Dashboard.Tests/Model/SqliteResourceRepositoryTests.cs (changed test)
1 directly: Aspire.Dashboard.Tests

🧪 tests/Aspire.Dashboard.Tests/Shared/SqliteRepositoryTestHelpers.cs (changed test)
1 directly: Aspire.Dashboard.Tests

Job reasons

Job Triggered by
cli-starter-validation affected project Aspire.Managed
extension-e2e src/Aspire.Dashboard/Configuration/DashboardOptions.cs, src/Aspire.Dashboard/ServiceClient/RepositoryFactory.cs, src/Aspire.Dashboard/ServiceClient/SqliteResourceRepository.Storage.cs, src/Aspire.Dashboard/ServiceClient/SqliteResourceRepository.cs
• affected project Aspire.Dashboard
polyglot affected project Aspire.Managed

Selection computed for commit ff0b55c.

@aspire-repo-bot
aspire-repo-bot Bot requested a balanced review from Copilot September 16, 2026 05:56
@JamesNK James Newton-King (JamesNK) changed the title Increase dashboard data limits Increase dashboard console log, structured log, and trace limits Sep 16, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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.

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants