From bf20e4c8e63638792e69098d4d9810c1136ff627 Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Thu, 28 Sep 2023 23:57:31 +0200 Subject: adding more stats (#429) - Feature: Add detailed stats on requests and data sizes on a per-bucket level, use parameter `cachestorestats=true` on the `/stats/z$` endpoint to enable - Feature: Add detailed stats on requests and data sizes on cidstore, use parameter `cidstorestats=true` on the `/stats/z$` endpoint to enable - Feature: Dashboard now accepts parameters in the URL which is passed on to the `/stats/z$` endpoint --- src/zenhttp/monitoring/httpstats.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/zenhttp/monitoring/httpstats.cpp') diff --git a/src/zenhttp/monitoring/httpstats.cpp b/src/zenhttp/monitoring/httpstats.cpp index 1dad48d68..43260a202 100644 --- a/src/zenhttp/monitoring/httpstats.cpp +++ b/src/zenhttp/monitoring/httpstats.cpp @@ -70,6 +70,11 @@ HttpStatsService::HandleRequest(HttpServerRequest& Request) if (Key[0] == '/') { Key.remove_prefix(1); + size_t SlashPos = Key.find_first_of("/?"); + if (SlashPos != std::string::npos) + { + Key = Key.substr(0, SlashPos); + } RwLock::SharedLockScope _(m_Lock); if (auto It = m_Providers.find(std::string{Key}); It != end(m_Providers)) -- cgit v1.2.3