@@ -14,6 +14,7 @@ import (
1414 "github.com/ash2k/stager"
1515 "github.com/go-logr/zapr"
1616 grpc_prometheus "github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus"
17+ "go.opentelemetry.io/otel/trace/noop"
1718
1819 "github.com/pluralsh/kuberentes-agent/cmd"
1920 "github.com/pluralsh/kuberentes-agent/pkg/agentcfg"
@@ -36,6 +37,7 @@ import (
3637 "github.com/pluralsh/kuberentes-agent/pkg/tool/tlstool"
3738 "github.com/pluralsh/kuberentes-agent/pkg/tool/wstunnel"
3839
40+ "github.com/coder/websocket"
3941 "github.com/prometheus/client_golang/prometheus"
4042 "github.com/prometheus/client_golang/prometheus/collectors"
4143 "github.com/spf13/cobra"
@@ -61,7 +63,6 @@ import (
6163 "k8s.io/client-go/tools/record"
6264 "k8s.io/klog/v2"
6365 "k8s.io/kubectl/pkg/cmd/util"
64- "nhooyr.io/websocket"
6566 "sigs.k8s.io/controller-runtime/pkg/log"
6667)
6768
@@ -129,7 +130,7 @@ func (a *App) Run(ctx context.Context) (retErr error) {
129130 unaryClientProm := clientProm .UnaryClientInterceptor ()
130131
131132 // TODO Tracing
132- tp := trace . NewNoopTracerProvider ()
133+ tp := noop . NewTracerProvider ()
133134 p := propagation .NewCompositeTextMapPropagator (propagation.TraceContext {}, propagation.Baggage {})
134135
135136 // TODO metrics via OTEL
@@ -416,7 +417,7 @@ func (a *App) constructKasConnection(ctx context.Context, tp trace.TracerProvide
416417 opts = append (opts , grpc .WithTransportCredentials (insecure .NewCredentials ()))
417418 }
418419 opts = append (opts , grpc .WithPerRPCCredentials (grpctool2 .NewTokenCredentials (a .AgentToken , ! secure )))
419- conn , err := grpc .DialContext ( ctx , addressToDial , opts ... )
420+ conn , err := grpc .NewClient ( addressToDial , opts ... )
420421 if err != nil {
421422 return nil , fmt .Errorf ("gRPC.dial: %w" , err )
422423 }
0 commit comments