diff --git a/lifecycle-operator/controllers/common/telemetry/otel_utils.go b/lifecycle-operator/controllers/common/telemetry/otel_utils.go index f1bf2ff3b3..3afce5f45c 100644 --- a/lifecycle-operator/controllers/common/telemetry/otel_utils.go +++ b/lifecycle-operator/controllers/common/telemetry/otel_utils.go @@ -3,7 +3,6 @@ package telemetry import ( "context" "fmt" - "net" "os" "sync" "time" @@ -136,11 +135,7 @@ func newStdOutExporter() (trace.SpanExporter, error) { func newOTelExporter(oTelCollectorUrl string) (trace.SpanExporter, error) { ctx, cancel := context.WithTimeout(context.TODO(), 3*time.Second) defer cancel() - _, err := net.DialTimeout("tcp", oTelCollectorUrl, 3*time.Second) - if err != nil { - return nil, fmt.Errorf("failed to create gRPC connection to collector at %s: %w", oTelCollectorUrl, err) - } - conn, err := grpc.NewClient(oTelCollectorUrl, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock()) + conn, err := grpc.DialContext(ctx, oTelCollectorUrl, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithBlock()) if err != nil { return nil, fmt.Errorf("failed to create gRPC connection to collector at %s: %w", oTelCollectorUrl, err) } diff --git a/lifecycle-operator/go.mod b/lifecycle-operator/go.mod index 99b0045388..5747dcfd7d 100644 --- a/lifecycle-operator/go.mod +++ b/lifecycle-operator/go.mod @@ -26,7 +26,7 @@ require ( go.opentelemetry.io/otel/trace v1.25.0 golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f golang.org/x/net v0.24.0 - google.golang.org/grpc v1.63.0 + google.golang.org/grpc v1.63.2 k8s.io/api v0.28.9 k8s.io/apiextensions-apiserver v0.28.9 k8s.io/apimachinery v0.28.9 diff --git a/lifecycle-operator/go.sum b/lifecycle-operator/go.sum index 8a7f9c09d3..75d3121b47 100644 --- a/lifecycle-operator/go.sum +++ b/lifecycle-operator/go.sum @@ -247,8 +247,8 @@ google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de h1: google.golang.org/genproto/googleapis/api v0.0.0-20240227224415-6ceb2ff114de/go.mod h1:5iCWqnniDlqZHrd3neWVTOwvh/v6s3232omMecelax8= google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda h1:LI5DOvAxUPMv/50agcLLoo+AdWc1irS9Rzz4vPuD1V4= google.golang.org/genproto/googleapis/rpc v0.0.0-20240401170217-c3f982113cda/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= -google.golang.org/grpc v1.63.0 h1:WjKe+dnvABXyPJMD7KDNLxtoGk5tgk+YFWN6cBWjZE8= -google.golang.org/grpc v1.63.0/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= diff --git a/scheduler/go.mod b/scheduler/go.mod index 9e6276a632..d1eb99b929 100644 --- a/scheduler/go.mod +++ b/scheduler/go.mod @@ -13,7 +13,7 @@ require ( go.opentelemetry.io/otel/exporters/stdout v0.20.0 go.opentelemetry.io/otel/sdk v0.20.0 go.opentelemetry.io/otel/trace v0.20.0 - google.golang.org/grpc v1.63.0 + google.golang.org/grpc v1.63.2 k8s.io/api v0.25.16 k8s.io/apimachinery v0.25.16 k8s.io/apiserver v0.25.16 diff --git a/scheduler/go.sum b/scheduler/go.sum index 1722ee32b5..8beb8224e7 100644 --- a/scheduler/go.sum +++ b/scheduler/go.sum @@ -664,8 +664,8 @@ google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTp google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.63.0 h1:WjKe+dnvABXyPJMD7KDNLxtoGk5tgk+YFWN6cBWjZE8= -google.golang.org/grpc v1.63.0/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= +google.golang.org/grpc v1.63.2 h1:MUeiw1B2maTVZthpU5xvASfTh3LDbxHd6IJ6QQVU+xM= +google.golang.org/grpc v1.63.2/go.mod h1:WAX/8DgncnokcFUldAxq7GeB5DXHDbMF+lLvDomNkRA= google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=