aboutsummaryrefslogtreecommitdiff
path: root/src/zenhttp/monitoring/httpstats.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2023-09-28 23:57:31 +0200
committerGitHub <[email protected]>2023-09-28 23:57:31 +0200
commitbf20e4c8e63638792e69098d4d9810c1136ff627 (patch)
treefee82fc0d15910902a4a3c24a5564867748b6419 /src/zenhttp/monitoring/httpstats.cpp
parentadded more context to http response error message (#430) (diff)
downloadzen-bf20e4c8e63638792e69098d4d9810c1136ff627.tar.xz
zen-bf20e4c8e63638792e69098d4d9810c1136ff627.zip
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
Diffstat (limited to 'src/zenhttp/monitoring/httpstats.cpp')
-rw-r--r--src/zenhttp/monitoring/httpstats.cpp5
1 files changed, 5 insertions, 0 deletions
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))