From db4344f6429139cf082fe400bcb24d1fb7c1cade Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Fri, 6 Oct 2023 11:31:14 +0100 Subject: Instrument manage patch branches --- guix-qa-frontpage/manage-patch-branches.scm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'guix-qa-frontpage') diff --git a/guix-qa-frontpage/manage-patch-branches.scm b/guix-qa-frontpage/manage-patch-branches.scm index 7764375..88601b4 100644 --- a/guix-qa-frontpage/manage-patch-branches.scm +++ b/guix-qa-frontpage/manage-patch-branches.scm @@ -11,6 +11,7 @@ #:use-module (web uri) #:use-module (web client) #:use-module (json) + #:use-module (prometheus) #:use-module (guix sets) #:use-module (guix memoization) #:use-module (guix build utils) @@ -284,6 +285,7 @@ #:remove-after? #t))) (define* (start-manage-patch-branches-thread database + metrics-registry #:key (series-count 200)) (define (dig alist . parts) (if (pair? alist) @@ -484,7 +486,12 @@ exn)) (lambda () (with-throw-handler #t - perform-pass + (lambda () + (call-with-duration-metric + metrics-registry + "manage_patch_branches_duration_seconds" + perform-pass + #:buckets (list 30 60 120 240 480 960 1920 3840 (inf)))) (lambda args (display (backtrace) (current-error-port)) (newline (current-error-port))))) -- cgit v1.2.3