aboutsummaryrefslogtreecommitdiff
path: root/guix-data-service
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-09-20 18:39:46 +0100
committerChristopher Baines <mail@cbaines.net>2020-09-20 18:39:46 +0100
commitfd3ba489d986d4f348c675cd63b1abd191f1aa86 (patch)
tree663090ed004d3580a9da559e77fb0cb9a0e7664b /guix-data-service
parent857ac36711d84ab3dab5b73fc5f25f158a1af3b9 (diff)
downloaddata-service-fd3ba489d986d4f348c675cd63b1abd191f1aa86.tar
data-service-fd3ba489d986d4f348c675cd63b1abd191f1aa86.tar.gz
Add a metric for the number of revisions
Diffstat (limited to 'guix-data-service')
-rw-r--r--guix-data-service/web/controller.scm7
1 files changed, 7 insertions, 0 deletions
diff --git a/guix-data-service/web/controller.scm b/guix-data-service/web/controller.scm
index 863805f..44d57c1 100644
--- a/guix-data-service/web/controller.scm
+++ b/guix-data-service/web/controller.scm
@@ -85,6 +85,10 @@
(define render-metrics
(let* ((registry (make-metrics-registry
#:namespace "guixdataservice"))
+
+ (revisions-count-metric (make-gauge-metric registry
+ "revision_count"))
+
(table-row-estimate-metric (make-gauge-metric registry
"table_row_estimate"
#:labels '(name)))
@@ -116,6 +120,9 @@
#:label-values `((name . ,name)))))
metric-values))
+ (metric-set revisions-count-metric
+ (count-guix-revisions conn))
+
(list (build-response
#:code 200
#:headers '((content-type . (text/plain))))