Add a metric for the number of revisions
This commit is contained in:
parent
857ac36711
commit
fd3ba489d9
1 changed files with 7 additions and 0 deletions
|
|
@ -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))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue