diff --git a/transport/grpc/client.go b/transport/grpc/client.go index e4959cd9e..c6221a8a6 100644 --- a/transport/grpc/client.go +++ b/transport/grpc/client.go @@ -87,7 +87,7 @@ func dial(ctx context.Context, insecure bool, opts ...ClientOption) (*grpc.Clien grpc.WithUnaryInterceptor(UnaryClientInterceptor(options.middleware)), } if options.discoverer != nil { - grpc.WithResolvers(discovery.NewBuilder(options.discoverer)) + grpcOpts = append(grpcOpts, grpc.WithResolvers(discovery.NewBuilder(options.discoverer))) } if insecure { grpcOpts = append(grpcOpts, grpc.WithInsecure()) diff --git a/transport/grpc/resolver/discovery/resolver.go b/transport/grpc/resolver/discovery/resolver.go index a25f127aa..af0ec5dcb 100644 --- a/transport/grpc/resolver/discovery/resolver.go +++ b/transport/grpc/resolver/discovery/resolver.go @@ -70,5 +70,5 @@ func parseAttributes(md map[string]string) *attributes.Attributes { for k, v := range md { pairs = append(pairs, k, v) } - return attributes.New(pairs) + return attributes.New(pairs...) }