diff options
| author | Dan Engelbrecht <[email protected]> | 2026-03-27 16:23:59 +0100 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2026-03-27 16:23:59 +0100 |
| commit | aff16da9a634ff6869b0394bf936bbb45096ad54 (patch) | |
| tree | 3d88cc842e6a87c3e4d07cc838a31b8dbabfce9a /src/zenserver/hub | |
| parent | remove CPR HTTP client backend (#894) (diff) | |
| download | zen-aff16da9a634ff6869b0394bf936bbb45096ad54.tar.xz zen-aff16da9a634ff6869b0394bf936bbb45096ad54.zip | |
dashboard improvements (#896)
- Feature: Added Workspaces dashboard page with HTTP request stats and per-workspace metrics
- Feature: Added Build Storage dashboard page with service-specific HTTP request stats
- Improvement: Front page now shows Hub and Object Store activity tiles; HTTP panel is fixed above the tiles grid
- Improvement: HTTP stats tiles now include 5m/15m rates and p999/max latency across all service pages
Diffstat (limited to 'src/zenserver/hub')
| -rw-r--r-- | src/zenserver/hub/httphubservice.cpp | 12 | ||||
| -rw-r--r-- | src/zenserver/hub/httphubservice.h | 1 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/zenserver/hub/httphubservice.cpp b/src/zenserver/hub/httphubservice.cpp index dcab50f2d..ebefcf2e3 100644 --- a/src/zenserver/hub/httphubservice.cpp +++ b/src/zenserver/hub/httphubservice.cpp @@ -286,11 +286,21 @@ HttpHubService::HandleStatusRequest(HttpServerRequest& Request) void HttpHubService::HandleStatsRequest(HttpServerRequest& Request) { + Request.WriteResponse(HttpResponseCode::OK, CollectStats()); +} + +CbObject +HttpHubService::CollectStats() +{ CbObjectWriter Cbo; EmitSnapshot("requests", m_HttpRequests, Cbo); - Request.WriteResponse(HttpResponseCode::OK, Cbo.Save()); + Cbo << "currentInstanceCount" << m_Hub.GetInstanceCount(); + Cbo << "maxInstanceCount" << m_Hub.GetMaxInstanceCount(); + Cbo << "instanceLimit" << m_Hub.GetConfig().InstanceLimit; + + return Cbo.Save(); } uint64_t diff --git a/src/zenserver/hub/httphubservice.h b/src/zenserver/hub/httphubservice.h index 5f940017e..1bb1c303e 100644 --- a/src/zenserver/hub/httphubservice.h +++ b/src/zenserver/hub/httphubservice.h @@ -29,6 +29,7 @@ public: virtual void HandleRequest(HttpServerRequest& Request) override; virtual void HandleStatusRequest(HttpServerRequest& Request) override; virtual void HandleStatsRequest(HttpServerRequest& Request) override; + virtual CbObject CollectStats() override; virtual uint64_t GetActivityCounter() override; void SetNotificationEndpoint(std::string_view UpstreamNotificationEndpoint, std::string_view InstanceId); |