Instrument requests

This commit is contained in:
Christopher Baines 2024-04-26 09:46:10 +01:00
parent 824e731a5c
commit 6201099003

View file

@ -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