Skip to content

Commit 736504c

Browse files
ENG-48179: Revert NewClient api usage in configgrpc.
With NewClient API usage, we are facing issues at few customers who have intermediate proxies between collector and platform. With NewClient API instead DialContext, DNS resolution happens on the client side while it should happen on proxy. Also, with SGProxy client does not get the correct certificate. can be changed once grpc fixes grpc/grpc-go#7556 and otel collector picks the fix
1 parent d3c5ce0 commit 736504c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

config/configgrpc/configgrpc.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ func (gcs *ClientConfig) ToClientConn(ctx context.Context, host component.Host,
224224
return nil, err
225225
}
226226
opts = append(opts, extraOpts...)
227-
return grpc.NewClient(gcs.sanitizedEndpoint(), opts...)
227+
return grpc.DialContext(ctx, gcs.sanitizedEndpoint(), opts...)
228228
}
229229

230230
func (gcs *ClientConfig) toDialOptions(ctx context.Context, host component.Host, settings component.TelemetrySettings) ([]grpc.DialOption, error) {

0 commit comments

Comments
 (0)