Unified Storage: When prom registry is nil, use the default registry (#97491)

when prom registry is nil, use the default registry
This commit is contained in:
owensmallwood 2024-12-05 10:44:58 -06:00 committed by GitHub
parent addbdb0545
commit 39aede9802
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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{})