aboutsummaryrefslogtreecommitdiff
path: root/guix-build-coordinator/agent-messaging
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2020-08-31 14:01:16 +0100
committerChristopher Baines <mail@cbaines.net>2020-08-31 14:01:16 +0100
commitce75afe3ea21fe68e0e2ea45976f5e51074c3b3e (patch)
treebd4a6312ace6ef25ed1f7bfca29dae0c3ca93cd7 /guix-build-coordinator/agent-messaging
parent14f14eeaedf0135e212160b1ab2aa0c0ecc49037 (diff)
downloadbuild-coordinator-ce75afe3ea21fe68e0e2ea45976f5e51074c3b3e.tar
build-coordinator-ce75afe3ea21fe68e0e2ea45976f5e51074c3b3e.tar.gz
Use the #:namespace argument for metric registries
Diffstat (limited to 'guix-build-coordinator/agent-messaging')
-rw-r--r--guix-build-coordinator/agent-messaging/http.scm22
1 files changed, 6 insertions, 16 deletions
diff --git a/guix-build-coordinator/agent-messaging/http.scm b/guix-build-coordinator/agent-messaging/http.scm
index 1a9a9e9..91b686b 100644
--- a/guix-build-coordinator/agent-messaging/http.scm
+++ b/guix-build-coordinator/agent-messaging/http.scm
@@ -142,9 +142,6 @@ port. Also, the port used can be changed by passing the --port option.\n"
""))
(define (base-datastore-metrics-updater build-coordinator)
- (define namespace
- "guixbuildcoordinator")
-
(define datastore
(build-coordinator-datastore build-coordinator))
@@ -152,34 +149,27 @@ port. Also, the port used can be changed by passing the --port option.\n"
(build-coordinator-metrics-registry build-coordinator))
(let ((builds-total
- (make-gauge-metric registry
- (string-append namespace
- "_builds_total")
+ (make-gauge-metric registry "builds_total"
#:labels '(system)))
(allocated-builds-total
(make-gauge-metric registry
- (string-append namespace
- "_allocated_builds_total")
+ "allocated_builds_total"
#:labels '(agent_id)))
(build-results-total
(make-gauge-metric registry
- (string-append namespace
- "_build_results_total")
+ "build_results_total"
#:labels '(agent_id result)))
(setup-failures-total
(make-gauge-metric registry
- (string-append namespace
- "_setup_failures_total")
+ "setup_failures_total"
#:labels '(agent_id reason)))
(build-allocation-plan-total
(make-gauge-metric registry
- (string-append namespace
- "_build_allocation_plan_total")
+ "build_allocation_plan_total"
#:labels '(agent_id)))
(unprocessed-hook-events-total
(make-gauge-metric registry
- (string-append namespace
- "_unprocessed_hook_events_total")
+ "unprocessed_hook_events_total"
#:labels '(event))))
(define (zero-metric-for-agents metric)
(for-each (lambda (agent-details)