diff options
author | Christopher Baines <mail@cbaines.net> | 2023-05-14 22:45:19 +0100 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2023-05-14 22:45:19 +0100 |
commit | 61f66193138322f724fc91ba2e89165574b26009 (patch) | |
tree | 4ca99174264838b15faf461c3d336a3cde3420b0 /guix-data-service | |
parent | bbacbcd2aa712613f5fde0e18c3cab474dd0f6ad (diff) | |
download | data-service-61f66193138322f724fc91ba2e89165574b26009.tar data-service-61f66193138322f724fc91ba2e89165574b26009.tar.gz |
Add Guile internal time metrics
As this will help identify when the service restarts.
Diffstat (limited to 'guix-data-service')
-rw-r--r-- | guix-data-service/web/controller.scm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/guix-data-service/web/controller.scm b/guix-data-service/web/controller.scm index efdd92c..2b8d2b5 100644 --- a/guix-data-service/web/controller.scm +++ b/guix-data-service/web/controller.scm @@ -173,6 +173,17 @@ (gc-metrics-updater (get-gc-metrics-updater registry))) + (define guile-time-metrics-updater + (let ((internal-real-time + (make-gauge-metric registry "guile_internal_real_time")) + (internal-run-time + (make-gauge-metric registry "guile_internal_run_time"))) + (lambda () + (metric-set internal-real-time + (get-internal-real-time)) + (metric-set internal-run-time + (get-internal-run-time))))) + (lambda () (letpar& ((metric-values (with-thread-postgresql-connection @@ -279,6 +290,7 @@ load-new-guix-revision-job-metrics) (gc-metrics-updater) + (guile-time-metrics-updater) (list (build-response #:code 200 |