From 39aede9802956dd4c004d088ccf5c5bb25b65269 Mon Sep 17 00:00:00 2001 From: owensmallwood Date: Thu, 5 Dec 2024 10:44:58 -0600 Subject: [PATCH] Unified Storage: When prom registry is nil, use the default registry (#97491) when prom registry is nil, use the default registry --- pkg/storage/unified/sql/service.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/storage/unified/sql/service.go b/pkg/storage/unified/sql/service.go index d39d37cddf2..31354049f28 100644 --- a/pkg/storage/unified/sql/service.go +++ b/pkg/storage/unified/sql/service.go @@ -71,6 +71,11 @@ func ProvideUnifiedStorageGrpcService( return nil, err } + // reg can be nil when running unified storage in standalone mode + if reg == nil { + reg = prometheus.DefaultRegisterer + } + // FIXME: This is a temporary solution while we are migrating to the new authn interceptor // grpcutils.NewGrpcAuthenticator should be used instead. authn, err := grpcutils.NewGrpcAuthenticatorWithFallback(cfg, prometheus.DefaultRegisterer, tracing, &grpc.Authenticator{})