Skip to content

Commit

Permalink
ENG-48179: setting default scheme to passthrough
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.
Passthrough scheme was the prior default and prevents resolution to
happen beforehand. This change can be removed 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 1b9b643
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config/configgrpc/configgrpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"crypto/tls"
"errors"
"fmt"
"google.golang.org/grpc/resolver"
"strings"
"time"

Expand Down Expand Up @@ -224,6 +225,7 @@ func (gcs *ClientConfig) ToClientConn(ctx context.Context, host component.Host,
return nil, err
}
opts = append(opts, extraOpts...)
resolver.SetDefaultScheme("passthrough")
return grpc.NewClient(gcs.sanitizedEndpoint(), opts...)
}

Expand Down

0 comments on commit 1b9b643

Please sign in to comment.