From 3979143ed145525e987bbac33379efbd2a518725 Mon Sep 17 00:00:00 2001 From: Kaushik Surya Date: Tue, 16 Jul 2024 20:57:47 -0400 Subject: [PATCH] Remove deprecated grpc calls (similar to https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/33194) --- .../internal/stores/kubeletutil/podresourcesclient.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/receiver/awscontainerinsightreceiver/internal/stores/kubeletutil/podresourcesclient.go b/receiver/awscontainerinsightreceiver/internal/stores/kubeletutil/podresourcesclient.go index 08fcf137dcb1..07af302ceae9 100644 --- a/receiver/awscontainerinsightreceiver/internal/stores/kubeletutil/podresourcesclient.go +++ b/receiver/awscontainerinsightreceiver/internal/stores/kubeletutil/podresourcesclient.go @@ -45,13 +45,8 @@ func (p *PodResourcesClient) connectToServer(socket string) (*grpc.ClientConn, e return nil, err } - ctx, cancel := context.WithTimeout(context.Background(), connectionTimeout) - defer cancel() - - conn, err := grpc.DialContext(ctx, - socket, + conn, err := grpc.NewClient("passthrough:"+socket, grpc.WithTransportCredentials(insecure.NewCredentials()), - grpc.WithBlock(), grpc.WithContextDialer(func(ctx context.Context, addr string) (net.Conn, error) { d := net.Dialer{} return d.DialContext(ctx, "unix", addr)