1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-06 16:06:56 +00:00
kyverno/pkg/metrics/fake.go

17 lines
329 B
Go
Raw Normal View History

package metrics
import (
"github.com/kyverno/kyverno/pkg/config"
"go.opentelemetry.io/otel"
"k8s.io/klog/v2"
)
func NewFakeMetricsConfig() *MetricsConfig {
mc := &MetricsConfig{
config: config.NewDefaultMetricsConfiguration(),
Log: klog.NewKlogr(),
}
_ = mc.initializeMetrics(otel.GetMeterProvider())
return mc
}