From 62010990032a87417b4e4358752d52407e5614a4 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Fri, 26 Apr 2024 09:46:10 +0100 Subject: Instrument requests --- guix-data-service/web/server.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'guix-data-service/web') diff --git a/guix-data-service/web/server.scm b/guix-data-service/web/server.scm index 4f2a4a0..6e91809 100644 --- a/guix-data-service/web/server.scm +++ b/guix-data-service/web/server.scm @@ -165,7 +165,9 @@ conn)))) (let ((render-metrics - (make-render-metrics registry))) + (make-render-metrics registry)) + (requests-metric + (make-counter-metric registry "requests_total"))) (with-exception-handler (lambda (exn) @@ -181,6 +183,8 @@ port. Also, the port used can be changed by passing the --port option.\n" (lambda () (run-server/patched (lambda (request body) + (metric-increment requests-metric) + (handler request finished? body controller secret-key-base startup-completed -- cgit v1.2.3