diff --git a/pkg/ruler/notifier.go b/pkg/ruler/notifier.go index 4840f4eea2..e91c84949a 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, } }