additional logging

This commit is contained in:
Michael Quigley
2025-10-03 14:41:31 -04:00
parent 76b02ea777
commit 7904415287
+2
View File
@@ -33,6 +33,7 @@ func NewAgentController(cfg *Config) (*Controller, error) {
func (ctrl *Controller) NewClient(serviceName string) (client agentGrpc.AgentClient, conn *grpc.ClientConn, err error) {
opts := []grpc.DialOption{
grpc.WithContextDialer(func(_ context.Context, addr string) (net.Conn, error) {
logrus.Warnf("dialing '%v'", addr)
conn, err := ctrl.zCtx.DialWithOptions(addr, &ziti.DialOptions{ConnectTimeout: 30 * time.Second})
if err != nil {
logrus.Warnf("initial dial failed; refreshing service '%v'", addr)
@@ -45,6 +46,7 @@ func (ctrl *Controller) NewClient(serviceName string) (client agentGrpc.AgentCli
}
return conn, nil
}
logrus.Warnf("returning success from initial dial for '%v'", addr)
return conn, nil
}),
grpc.WithTransportCredentials(insecure.NewCredentials()),