aboutsummaryrefslogtreecommitdiff
path: root/zenserver/experimental/frontend.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2021-10-04 17:54:21 +0200
committerStefan Boberg <[email protected]>2021-10-04 17:54:21 +0200
commitf4c6f75ed3620e777d8194bf59a24b7d6dc4200a (patch)
tree7c3f77c7907e091270847602fc76371755f105ab /zenserver/experimental/frontend.cpp
parentfilesystem: Added comment for future optimization opportunities in CreateDire... (diff)
downloadzen-f4c6f75ed3620e777d8194bf59a24b7d6dc4200a.tar.xz
zen-f4c6f75ed3620e777d8194bf59a24b7d6dc4200a.zip
stats: Implemented new stats endpoint
Stats are exposed under /stats/{id}, so for example structured cache stats are exposed under /stats/z$ The separate endpoint makes it easier to separate request handling to ensure stats/status endpoints still respond if the regular request queue is somehow saturated or otherwise not behaving There is also a /status endpoint which is similar and is targeted towards lightweight health monitoring
Diffstat (limited to 'zenserver/experimental/frontend.cpp')
-rw-r--r--zenserver/experimental/frontend.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/zenserver/experimental/frontend.cpp b/zenserver/experimental/frontend.cpp
index 79fcf0a17..98d570cfe 100644
--- a/zenserver/experimental/frontend.cpp
+++ b/zenserver/experimental/frontend.cpp
@@ -24,7 +24,7 @@ body {
<script type="text/javascript">
const getCacheStats = () => {
const opts = { headers: { "Accept": "application/json" } };
- fetch("/z$", opts)
+ fetch("/stats/z$", opts)
.then(response => {
if (!response.ok) {
throw Error(response.statusText);