Repository navigation
fix(dashboard): restore dashboard silo statistics and narrow-screen navigation - #11493
Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
The cross-layer runtime, telemetry, and responsive UI changes need final human validation while CI and browser behavior remain unconfirmed.
0 open findings
What changed in this PR
Restores accurate dashboard silo statistics, live counter refreshes, and narrow-screen navigation.
Changes:
- Sources client/message-byte totals directly from runtime state.
- Corrects OpenTelemetry meter selection, aggregation, and refresh behavior.
- Adds responsive sidebar controls and clearer byte displays.
| File | Description |
|---|---|
test/Orleans.Runtime.Tests/Diagnostics/MessagingInstrumentsTests.cs |
Tests byte totals without listeners. |
test/Orleans.Dashboard.Tests/Orleans.Dashboard.UnitTests/SiloRuntimeStatisticsTests.cs |
Tests dashboard runtime statistics. |
test/Orleans.Dashboard.Tests/Orleans.Dashboard.UnitTests/DashboardTelemetryExporterTests.cs |
Tests metric aggregation and deltas. |
test/Orleans.Dashboard.Tests/Orleans.Dashboard.UnitTests/DashboardHostTests.cs |
Tests local-meter isolation. |
test/Orleans.Core.Tests/Runtime/DeploymentLoadPublisherTests.cs |
Tests published clients and bytes. |
test/Orleans.Core.Tests/Runtime/ActivationCountPlacementDirectorTests.cs |
Updates statistics construction. |
src/Orleans.Runtime/Silo/SiloControl.cs |
Supplies live runtime totals. |
src/Orleans.Runtime/Placement/DeploymentLoadPublisher.cs |
Publishes live runtime totals. |
src/Orleans.Runtime/Messaging/IConnectedClientCollection.cs |
Adds client count access. |
src/Orleans.Runtime/Messaging/Gateway.cs |
Exposes gateway client count. |
src/Orleans.Core/Statistics/SiloRuntimeStatistics.cs |
Accepts explicit client/byte values. |
src/Orleans.Core/Statistics/SiloRuntimeMetricsListener.cs |
Deprecates the unused listener. |
src/Orleans.Core/Diagnostics/Metrics/MessagingInstruments.cs |
Tracks cumulative message bytes. |
src/Dashboard/Orleans.Dashboard/Implementation/DashboardTelemetryExporter.cs |
Aggregates tagged metric series. |
src/Dashboard/Orleans.Dashboard/DashboardHost.cs |
Selects the local Orleans meter. |
src/Dashboard/Orleans.Dashboard.App/src/silos/silo.tsx |
Displays formatted byte totals. |
src/Dashboard/Orleans.Dashboard.App/src/silos/silo-counters.tsx |
Exports the counter type. |
src/Dashboard/Orleans.Dashboard.App/src/lib/sidebar.ts |
Implements responsive sidebar controls. |
src/Dashboard/Orleans.Dashboard.App/src/index.tsx |
Refreshes counters and initializes navigation. |
src/Dashboard/Orleans.Dashboard.App/src/custom.css |
Enables sidebar scrolling. |
src/Dashboard/Orleans.Dashboard.App/index.html |
Adds accessible mobile navigation markup. |
src/api/Orleans.Core/Orleans.Core.cs |
Updates the generated API surface. |
🧠 Review effort: Balanced
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Code coverage
Report-only conclusion: improved. The current-main baseline is commit Coverage combines every CI test matrix job, including providers, CodeGen, .NET 8/10, Linux, Windows, and macOS, using canonical physical source and branch identities. The comparison remains report-only while normal line and branch variance is calibrated. Coverage details |
|
@ScarletKuro — Copilot findings, synthesized from our PR #11492, are now consolidated in c68bcf8:
These changes form one #11491 fix, so they remain together here. The rebase onto current main includes merged #11497's Pkcs restore fix. Post-rebase focused checks passed: 28 dashboard tests on each of net8.0 and net10.0, plus all seven browser regressions repeated three times (21/21). ESLint passed with existing warnings. Exact-head CI is running for c68bcf8, including the new Dashboard UI regressions job. The PR description now reflects the consolidated design and byte-total collection boundary. |
There was a problem hiding this comment.
🟡 Changes recommended
Overlapping silo-summary counter requests can overwrite newer byte totals with stale responses.
1 open finding
Files not reviewed (1)
- src/Dashboard/Orleans.Dashboard.App/package-lock.json: Generated file
🧠 Review effort: Balanced
|
Ty for picking this up Should I fix the Copilot comment about the overlapping counter requests, or are you on it? Don't want us both pushing to the branch. Also, |
Please do, and let me know when I should take a final, deeper look.
We should tackle it as a follow-up. Eg, perhaps by forcing the listener to start if it hasn't started and those APIs are called (some messages might be missed), or perhaps there's a better solution |
|
Silo page now uses the same pending guard as the other pages, plus a browser test. Also added a catch on both counter requests so a failed refresh doesn't throw an unhandled rejection every second.
Nit: the Otherwise ready for your final look. |
There was a problem hiding this comment.
🔵 Needs a closer look
Cross-layer telemetry lifecycle and accessibility changes warrant human review with current-head CI validation, which was not independently confirmed.
0 open findings
1 resolved since last review
Files not reviewed (1)
- src/Dashboard/Orleans.Dashboard.App/package-lock.json: Generated file
🧠 Review effort: Balanced
b4338e5 to
a25b5fa
Compare
There was a problem hiding this comment.
🔵 Needs a closer look
Cross-layer telemetry and lifecycle changes need maintainer validation, with a remaining test-timing race and current-head coverage unverified.
1 open issue
1 file not reviewed
src/Dashboard/Orleans.Dashboard.App/package-lock.json: Generated file
Review effort: Balanced
There was a problem hiding this comment.
🔵 Needs a closer look
Cross-layer telemetry lifecycle and accessibility changes need final human validation; completed current-head regression and coverage evidence is unavailable.
No open issues 🎉
1 resolved since last review
1 file not reviewed
src/Dashboard/Orleans.Dashboard.App/package-lock.json: Generated file
Review effort: Balanced
4b76a0b to
51df397
Compare
@ReubenBond went ahead and added the missing guards, since they're too small for a follow-up and it's nicer to have it consistent right away. Grain details only loads once, so it didn't need the guard. Left the TagKeys nit for you since it's your design call Ready for final review now. upd: ups, dropped one commit because of rebase, fixed now. |
SiloRuntimeStatistics read its client count and message byte totals from SiloRuntimeMetricsListener, which the runtime never started, so the values were always zero. Read the connected client count from the gateway's client collection and keep cumulative message byte totals in MessagingInstruments next to the existing header byte totals. Both are exact and cost one interlocked add per message, without enabling the message size histograms on silos that have no metrics exporter. Mark SiloRuntimeMetricsListener obsolete in favor of IManagementGrain.GetRuntimeStatistics. Refs dotnet#11491
…ation - Collect dashboard counters from the silo's Microsoft.Orleans meter rather than the unused "Orleans" meter name, dropping same-named meters owned by other silos or clients in the process. - Export up/down counters and combine tagged metric points into one silo-wide value instead of keeping the last point. - Refresh the "View all counters" page on the dashboard refresh interval. - Remove the queue length fields the runtime no longer reports, and label message totals as bytes to match SiloRuntimeStatistics. - Add a navigation toggle below AdminLTE's lg breakpoint, where its CSS hides the sidebar until the body has the sidebar-open class. Fixes dotnet#11491
df01bb5 to
2e17174
Compare
The request-count assertion completed before the released XHR response, so a fake-clock tick could run while the request was still pending. Wait for response completion before checking that polling resumes.
…avigation (dotnet#11493) Co-authored-by: Reuben Bond <[email protected]> (cherry picked from commit 6adf7a1) Upstream-PR: dotnet#11493 Upstream-Commit: 6adf7a1
…avigation (#11493) Co-authored-by: Reuben Bond <[email protected]> (cherry picked from commit 6adf7a1) Upstream-PR: #11493 Upstream-Commit: 6adf7a1

Fixes #11491
Problem
After upgrading to Orleans 10, the dashboard's silo page showed zero clients and message totals, "View all counters" stayed empty and never refreshed, and the sidebar became unreachable on narrow screens.
SiloRuntimeMetricsListener.Orleanswhile the runtime publishes onMicrosoft.Orleans; up/down counters and additional tagged series were omitted.Solution
Runtime
IConnectedClientCollection.Count, for both management statistics and deployment-load publication.SiloRuntimeMetricsListenerpublic API and management byte-field behavior stable.Dashboard
Microsoft.Orleansmeter instance, starting atBecomeActive, before the gateway opens atActive.lgbreakpoint. Overlay clicks, menu navigation, and Escape close the sidebar; focus restoration, inert hidden content, and breakpoint transitions keep navigation accessible.This consolidates Copilot findings synthesized from our PR #11492 into the same #11491 fix.
Microsoft Reviewers: Open in CodeFlow
Rationale
Telemetry ownership and collection lifetime
The gateway owns connected-client membership, so runtime statistics read its current count directly. The dashboard owns the byte displays and derives their totals from its opt-in OpenTelemetry collection. This keeps the runtime messaging hot path unchanged and makes the collection time boundary explicit.
The histogram-specific view keeps only the sums needed by the dashboard. Other instruments retain their tagged series so the exporter can combine them into the correct silo-wide value.
Sidebar toggle
A small toggle integrates with AdminLTE's responsive sidebar classes and provides the focus, keyboard, and dismissal behavior required by the dashboard.