From d06a28e77e77bc28f9aa8f2fa17cf013536c80d1 Mon Sep 17 00:00:00 2001 From: Puneet Agarwal Date: Tue, 17 Sep 2024 19:50:13 +0530 Subject: [PATCH] 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 https://github.com/grpc/grpc-go/issues/7556 and otel collector picks the fix --- config/configgrpc/configgrpc.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/configgrpc/configgrpc.go b/config/configgrpc/configgrpc.go index e9d3ffc39e4..2daad6c3de5 100644 --- a/config/configgrpc/configgrpc.go +++ b/config/configgrpc/configgrpc.go @@ -230,7 +230,7 @@ func (gcs *ClientConfig) ToClientConn(_ context.Context, host component.Host, se return nil, err } opts = append(opts, extraOpts...) - return grpc.NewClient(gcs.sanitizedEndpoint(), opts...) + return grpc.DialContext(ctx, gcs.sanitizedEndpoint(), opts...) } func (gcs *ClientConfig) toDialOptions(host component.Host, settings component.TelemetrySettings) ([]grpc.DialOption, error) {