Repository navigation
Respect hidden resources in dashboard telemetry views - #22656
James Newton-King (JamesNK) wants to merge 2 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 -- 22656Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 22656" |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the telemetry resource-visibility changes.
No open issues 🎉
What changed in this PR
This PR makes the modern dashboard’s All resources telemetry views respect resource visibility, aligning Metrics, Structured Logs, and Traces with the resource pane.
Changes:
- Applies Show hidden resources to aggregate telemetry and metric-pinning scopes, refreshing open pages when toggled.
- Preserves explicit resource links and complete traces that include visible resources.
- Adds component regression tests and documents the visibility behavior.
| File | Description |
|---|---|
tests/Aspire.Dashboard.Components.Tests/Shared/ResourceSetupHelpers.cs |
Adds a shared helper for toggling hidden-resource visibility. |
tests/Aspire.Dashboard.Components.Tests/Pages/TracesTests.cs |
Tests hidden-only trace filtering and preservation of mixed-resource traces. |
tests/Aspire.Dashboard.Components.Tests/Pages/StructuredLogsTests.cs |
Tests log visibility toggles and hidden unread-error preservation. |
tests/Aspire.Dashboard.Components.Tests/Pages/MetricsTests.cs |
Tests visibility toggles when only hidden resources provide metrics. |
tests/Aspire.Dashboard.Components.Tests/Layout/ResourcesLayoutTests.cs |
Tests aggregate telemetry and pinning scopes across visibility changes. |
src/Aspire.Dashboard/README.md |
Documents hidden-resource filtering and mixed-trace behavior. |
src/Aspire.Dashboard/Components/Pages/Metrics.razor.cs |
Preserves explicit resource resolution and the aggregate selection option. |
src/Aspire.Dashboard/Components/Layout/ResourcesLayout.razor.cs |
Filters aggregate scopes by visibility and notifies pages when toggled. |
Review effort: Balanced
|
Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt. |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
15715dd to
f88347a
Compare
Tests selector13 / 101 PR test projects · 2 PR jobs, from 12 changed files. Selected PR test projects (13 / 101)
Selected PR jobs (2)
How these were chosen — grouped by what changed
🔧 📦 affected project 🧪 🧪 🧪 🧪 🧪 🧪 🧪 Job reasons
Selection computed for commit |
There was a problem hiding this comment.
🟡 Changes recommended
Turning off Show hidden resources while viewing a hidden resource replaces its selection with a missing-resource placeholder, disables log clearing, and causes a later filter refresh to drop its log stream.
1 open issue
Review effort: Balanced
| _showHiddenResources = showHiddenResources; | ||
| UpdateResourcesList(); |

Description
Hidden AppHost resources were excluded from the resource list but could still contribute meters and instruments, structured log entries, and trace rows to All resources. This made the telemetry pages noisier and inconsistent with the visibility setting.
The modern dashboard now applies Show hidden resources to the shared aggregate telemetry scope and refreshes the open page when the setting changes. Explicit resource links still work, and traces that involve a visible resource retain their full waterfall.
User-facing usage
Open All resources in Metrics, Structured Logs, or Traces. In the resource pane, choose View options > Show hidden resources to include hidden resources' telemetry without reloading. Choose Hide hidden resources to remove it again. Mixed traces remain visible when they include a visible resource.
Screenshots / Recordings
Validation
Passed: 287 dashboard component tests covering the resource layout, Metrics, Structured Logs, and Traces, including toggle updates, hidden-only metrics, unread errors, and mixed-resource traces.
Fixes # (issue)
Checklist
<remarks />and<code />elements on your triple slash comments?