aboutsummaryrefslogtreecommitdiff
path: root/guix-build-coordinator/agent-messaging
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2024-04-17 09:35:58 +0100
committerChristopher Baines <mail@cbaines.net>2024-04-17 09:35:58 +0100
commitd75181ebeba1caa8663e09b9dbe504912b199edf (patch)
tree9f57965df90ace65bef7ed17a4551bf9feaf8f95 /guix-build-coordinator/agent-messaging
parent4ac4141741214fe6e97fb2ebe405d36228aea596 (diff)
downloadbuild-coordinator-d75181ebeba1caa8663e09b9dbe504912b199edf.tar
build-coordinator-d75181ebeba1caa8663e09b9dbe504912b199edf.tar.gz
Use the new process metrics exporter
Diffstat (limited to 'guix-build-coordinator/agent-messaging')
-rw-r--r--guix-build-coordinator/agent-messaging/http/server.scm21
1 files changed, 13 insertions, 8 deletions
diff --git a/guix-build-coordinator/agent-messaging/http/server.scm b/guix-build-coordinator/agent-messaging/http/server.scm
index 7bfc0b5..85ba0d4 100644
--- a/guix-build-coordinator/agent-messaging/http/server.scm
+++ b/guix-build-coordinator/agent-messaging/http/server.scm
@@ -137,13 +137,14 @@ INTERVAL (a time-duration object), otherwise does nothing and returns #f."
build-coordinator
chunked-request-channel
output-hash-channel)
+ (define plain-metrics-registry
+ (make-metrics-registry))
+
(define gc-metrics-updater
- (get-gc-metrics-updater
- (build-coordinator-metrics-registry build-coordinator)))
+ (get-gc-metrics-updater plain-metrics-registry))
- (define port-metrics-updater
- (get-port-metrics-updater
- (build-coordinator-metrics-registry build-coordinator)))
+ (define process-metrics-updater
+ (get-process-metrics-updater plain-metrics-registry))
(define thread-metric
(make-gauge-metric
@@ -157,7 +158,7 @@ INTERVAL (a time-duration object), otherwise does nothing and returns #f."
(call-with-delay-logging gc-metrics-updater)
(metric-set thread-metric
(length (all-threads)))
- (call-with-delay-logging port-metrics-updater)
+ (call-with-delay-logging process-metrics-updater)
(call-with-delay-logging datastore-metrics-updater))
(with-exception-handler
@@ -184,7 +185,8 @@ INTERVAL (a time-duration object), otherwise does nothing and returns #f."
build-coordinator
chunked-request-channel
output-hash-channel
- update-managed-metrics!)))
+ update-managed-metrics!
+ plain-metrics-registry)))
#:host host
#:port port))
#:unwind? #t))
@@ -614,7 +616,8 @@ INTERVAL (a time-duration object), otherwise does nothing and returns #f."
build-coordinator
chunked-request-channel
output-hash-channel
- update-managed-metrics!)
+ update-managed-metrics!
+ plain-metrics-registry)
(define (authenticated? uuid request)
(let* ((authorization-base64
(match (assq-ref (request-headers request)
@@ -1015,6 +1018,8 @@ INTERVAL (a time-duration object), otherwise does nothing and returns #f."
(lambda (port)
(write-metrics (build-coordinator-metrics-registry
build-coordinator)
+ port)
+ (write-metrics plain-metrics-registry
port))))))
(_
(render-json