Add some new metrics about load new revision jobs
This commit is contained in:
parent
fd3ba489d9
commit
af2e12a9ef
2 changed files with 36 additions and 0 deletions
|
|
@ -89,6 +89,12 @@
|
|||
(revisions-count-metric (make-gauge-metric registry
|
||||
"revision_count"))
|
||||
|
||||
(load-new-guix-revision-job-count (make-gauge-metric
|
||||
registry
|
||||
"load_new_guix_revision_job_count"
|
||||
#:labels '(repository_label
|
||||
completed)))
|
||||
|
||||
(table-row-estimate-metric (make-gauge-metric registry
|
||||
"table_row_estimate"
|
||||
#:labels '(name)))
|
||||
|
|
@ -123,6 +129,16 @@
|
|||
(metric-set revisions-count-metric
|
||||
(count-guix-revisions conn))
|
||||
|
||||
(for-each (match-lambda
|
||||
((repository-label completed count)
|
||||
(metric-set
|
||||
load-new-guix-revision-job-count
|
||||
count
|
||||
#:label-values
|
||||
`((repository_label . ,repository-label)
|
||||
(completed . ,(if completed "yes" "no"))))))
|
||||
(select-load-new-guix-revision-job-metrics conn))
|
||||
|
||||
(list (build-response
|
||||
#:code 200
|
||||
#:headers '((content-type . (text/plain))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue