aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-04-28 18:29:39 +0100
committerChristopher Baines <mail@cbaines.net>2020-04-28 18:29:39 +0100
commitbc3bbb6eadeeaf38243e9edc8272021a8f4f1517 (patch)
treede9f596b0c8ba28b17c44a8357f78dbd4bffc9a4
parent84c18f711a44f363e948e01b1cb9bb5fad62f734 (diff)
downloadbuild-coordinator-bc3bbb6eadeeaf38243e9edc8272021a8f4f1517.tar
build-coordinator-bc3bbb6eadeeaf38243e9edc8272021a8f4f1517.tar.gz
Fix metric namespacing in a few places
-rw-r--r--guix-build-coordinator/coordinator.scm2
-rw-r--r--guix-build-coordinator/datastore/sqlite.scm6
2 files changed, 5 insertions, 3 deletions
diff --git a/guix-build-coordinator/coordinator.scm b/guix-build-coordinator/coordinator.scm
index 5538735..79013ea 100644
--- a/guix-build-coordinator/coordinator.scm
+++ b/guix-build-coordinator/coordinator.scm
@@ -138,7 +138,7 @@
(wait-condition-variable v mtx)
(call-with-duration-metric
coordinator-metrics-registry
- "allocate_builds_duration_seconds"
+ "guixbuildcoordinator_allocate_builds_duration_seconds"
(lambda ()
(allocate-builds datastore)))))))
diff --git a/guix-build-coordinator/datastore/sqlite.scm b/guix-build-coordinator/datastore/sqlite.scm
index 97d86ba..0407f39 100644
--- a/guix-build-coordinator/datastore/sqlite.scm
+++ b/guix-build-coordinator/datastore/sqlite.scm
@@ -84,11 +84,13 @@
(define (call-with-time-tracking datastore metric-name thunk)
(let* ((registry (slot-ref datastore 'metrics-registry))
+ (namespaced-metric-name
+ (string-append "guixbuildcoordinator_" metric-name))
(metric
- (or (metrics-registry-fetch-metric registry metric-name)
+ (or (metrics-registry-fetch-metric registry namespaced-metric-name)
(make-histogram-metric
registry
- metric-name)))
+ namespaced-metric-name)))
(start-time (current-time)))
(let ((result (thunk)))
(metric-observe metric (- (current-time) start-time))