aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2024-06-11 15:47:19 +0100
committerChristopher Baines <mail@cbaines.net>2024-06-12 17:37:28 +0100
commit43ceba0f59bf53e2097789a0005c3104a0ab0796 (patch)
treed26c5de07b3193acea2cd956de7baabc584374b6
parent675317772920faf66d0568ca40cac467e4588174 (diff)
downloadnar-herder-43ceba0f59bf53e2097789a0005c3104a0ab0796.tar
nar-herder-43ceba0f59bf53e2097789a0005c3104a0ab0796.tar.gz
Instrument request loops
-rw-r--r--nar-herder/server.scm5
1 files changed, 5 insertions, 0 deletions
diff --git a/nar-herder/server.scm b/nar-herder/server.scm
index b1c85ef..30b8c8d 100644
--- a/nar-herder/server.scm
+++ b/nar-herder/server.scm
@@ -217,6 +217,10 @@
(response_code . ,response-code)
,@labels)))
+ (define loop-detections-metric
+ (make-counter-metric metrics-registry
+ "loop_detections_total"))
+
(define %compression-strings
(map symbol->string
%compression-options))
@@ -382,6 +386,7 @@
(assq-ref narinfo 'id)))
(when loop?
+ (metric-increment loop-detections-metric)
(log-msg logger 'WARN
(request-method request)
" "