From 67bcda5a785053d11dc903fc80bfd003ae682e01 Mon Sep 17 00:00:00 2001 From: Ben Ye Date: Thu, 28 Dec 2023 06:12:13 -0800 Subject: [PATCH] update registry Signed-off-by: Ben Ye --- pkg/ruler/notifier.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkg/ruler/notifier.go b/pkg/ruler/notifier.go index 4840f4eea25..e91c84949af 100644 --- a/pkg/ruler/notifier.go +++ b/pkg/ruler/notifier.go @@ -4,6 +4,7 @@ import ( "context" "flag" "fmt" + "github.com/prometheus/client_golang/prometheus" "net/url" "regexp" "strings" @@ -43,12 +44,12 @@ type rulerNotifier struct { logger gklog.Logger } -func newRulerNotifier(o *notifier.Options, l gklog.Logger) *rulerNotifier { +func newRulerNotifier(o *notifier.Options, l gklog.Logger, registerer prometheus.Registerer) *rulerNotifier { sdCtx, sdCancel := context.WithCancel(context.Background()) return &rulerNotifier{ notifier: notifier.NewManager(o, l), sdCancel: sdCancel, - sdManager: discovery.NewManager(sdCtx, l, nil), + sdManager: discovery.NewManager(sdCtx, l, registerer), logger: l, } }