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
puneet-traceable committed Sep 18, 2024

Verified

This commit was signed with the committer’s verified signature.
1 parent 9af37d4 commit d06a28e
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
@@ -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...)

Check failure on line 233 in config/configgrpc/configgrpc.go

GitHub Actions / test-coverage

undefined: ctx

Check failure on line 233 in config/configgrpc/configgrpc.go

GitHub Actions / unittest-matrix (ubuntu-latest, ~1.21.11)

undefined: ctx

Check failure on line 233 in config/configgrpc/configgrpc.go

GitHub Actions / unittest-matrix (ubuntu-latest, ~1.22)

undefined: ctx

Check failure on line 233 in config/configgrpc/configgrpc.go

GitHub Actions / windows-unittest

undefined: ctx
}

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

0 comments on commit d06a28e

Please sign in to comment.