Skip to content

Commit

Permalink
ENG-48179: Revert NewClient api usage in configgrpc.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
puneet-traceable committed Sep 17, 2024
1 parent d3c5ce0 commit 736504c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/configgrpc/configgrpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ func (gcs *ClientConfig) ToClientConn(ctx context.Context, host component.Host,
return nil, err
}
opts = append(opts, extraOpts...)
return grpc.NewClient(gcs.sanitizedEndpoint(), opts...)
return grpc.DialContext(ctx, gcs.sanitizedEndpoint(), opts...)
}

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

0 comments on commit 736504c

Please sign in to comment.