Fix bug in which APIServerTracing did not work with some egress selectors
Kubernetes-commit: 00bcd6cf01b719d0fddc8331ffecd3de35e8896f
This commit is contained in:
parent
f1ba5b4065
commit
73fdf7e37b
|
|
@ -101,11 +101,12 @@ func (o *TracingOptions) ApplyTo(es *egressselector.EgressSelector, c *server.Co
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
if egressDialer != nil {
|
||||||
otelDialer := func(ctx context.Context, addr string) (net.Conn, error) {
|
otelDialer := func(ctx context.Context, addr string) (net.Conn, error) {
|
||||||
return egressDialer(ctx, "tcp", addr)
|
return egressDialer(ctx, "tcp", addr)
|
||||||
|
}
|
||||||
|
opts = append(opts, otlptracegrpc.WithDialOption(grpc.WithContextDialer(otelDialer)))
|
||||||
}
|
}
|
||||||
opts = append(opts, otlptracegrpc.WithDialOption(grpc.WithContextDialer(otelDialer)))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
resourceOpts := []resource.Option{
|
resourceOpts := []resource.Option{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue