From 2ba63533169223cca96002e17147b12e217ddfed Mon Sep 17 00:00:00 2001 From: Maksym Pavlenko Date: Wed, 13 Jul 2022 12:47:13 -0700 Subject: [PATCH] Change metrics namespace for sandboxed CRI to prevent panic panic: duplicate metrics collector registration attempted Signed-off-by: Maksym Pavlenko --- pkg/cri/sbserver/metrics.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/cri/sbserver/metrics.go b/pkg/cri/sbserver/metrics.go index 99b3f5d66..ddf71af35 100644 --- a/pkg/cri/sbserver/metrics.go +++ b/pkg/cri/sbserver/metrics.go @@ -38,7 +38,7 @@ var ( func init() { // these CRI metrics record latencies for successful operations around a sandbox and container's lifecycle. - ns := metrics.NewNamespace("containerd", "cri", nil) + ns := metrics.NewNamespace("containerd", "cri_sandboxed", nil) sandboxListTimer = ns.NewTimer("sandbox_list", "time to list sandboxes") sandboxCreateNetworkTimer = ns.NewTimer("sandbox_create_network", "time to create the network for a sandbox")