Skip to content

Commit 39aede9

Browse files
Unified Storage: When prom registry is nil, use the default registry (grafana#97491)
when prom registry is nil, use the default registry
1 parent addbdb0 commit 39aede9

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/storage/unified/sql/service.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,11 @@ func ProvideUnifiedStorageGrpcService(
7171
return nil, err
7272
}
7373

74+
// reg can be nil when running unified storage in standalone mode
75+
if reg == nil {
76+
reg = prometheus.DefaultRegisterer
77+
}
78+
7479
// FIXME: This is a temporary solution while we are migrating to the new authn interceptor
7580
// grpcutils.NewGrpcAuthenticator should be used instead.
7681
authn, err := grpcutils.NewGrpcAuthenticatorWithFallback(cfg, prometheus.DefaultRegisterer, tracing, &grpc.Authenticator{})

0 commit comments

Comments
 (0)