Change metrics namespace for sandboxed CRI to prevent panic

panic: duplicate metrics collector registration attempted

Signed-off-by: Maksym Pavlenko <pavlenko.maksym@gmail.com>
This commit is contained in:
Maksym Pavlenko 2022-07-13 12:47:13 -07:00
parent b8e93774c1
commit 2ba6353316

View File

@ -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")