From 0301e64e3a975ef186362249395bef4a6c2145d9 Mon Sep 17 00:00:00 2001 From: FlamingSaint Date: Wed, 24 Jul 2024 12:56:18 +0530 Subject: [PATCH] fix Signed-off-by: FlamingSaint --- plugin/metrics/prometheus/factory.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugin/metrics/prometheus/factory.go b/plugin/metrics/prometheus/factory.go index 3ac09b963b9..03ad9f2912f 100644 --- a/plugin/metrics/prometheus/factory.go +++ b/plugin/metrics/prometheus/factory.go @@ -80,9 +80,7 @@ func NewFactoryWithConfig( f.options = &Options{ Configuration: cfg, } - err := f.Initialize(logger) - if err != nil { - return nil, err - } + f.Initialize(logger) + return f, nil }