diff --git a/pkg/util/metric/registry.go b/pkg/util/metric/registry.go index 8a9e071328c9..ce9f0aa722fd 100644 --- a/pkg/util/metric/registry.go +++ b/pkg/util/metric/registry.go @@ -107,7 +107,7 @@ func (r *Registry) AddMetricStruct(metricStruct interface{}) { continue } switch vfield.Kind() { - case reflect.Array: + case reflect.Array, reflect.Slice: for i := 0; i < vfield.Len(); i++ { velem := vfield.Index(i) telemName := fmt.Sprintf("%s[%d]", tname, i)