mirror of
https://github.com/kyverno/kyverno.git
synced 2024-12-14 11:57:48 +00:00
b4e863e075
Signed-off-by: Charles-Edouard Brétéché <charles.edouard@nirmata.com>
16 lines
329 B
Go
16 lines
329 B
Go
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
|
|
}
|