fix metrics wrapper
This commit is contained in:
@@ -184,7 +184,7 @@ func (h *tunnelHandler) createEntrypointService(addr string, ingress ingress.Ing
|
|||||||
"kind": "service",
|
"kind": "service",
|
||||||
})
|
})
|
||||||
epListener := newTCPListener(ln,
|
epListener := newTCPListener(ln,
|
||||||
listener.AddrOption(h.md.entryPoint),
|
listener.AddrOption(addr),
|
||||||
listener.ServiceOption(serviceName),
|
listener.ServiceOption(serviceName),
|
||||||
listener.ProxyProtocolOption(h.md.entryPointProxyProtocol),
|
listener.ProxyProtocolOption(h.md.entryPointProxyProtocol),
|
||||||
listener.LoggerOption(log.WithFields(map[string]any{
|
listener.LoggerOption(log.WithFields(map[string]any{
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ type serverConn struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func WrapConn(service string, c net.Conn) net.Conn {
|
func WrapConn(service string, c net.Conn) net.Conn {
|
||||||
if !xmetrics.IsEnabled() || c == nil {
|
if c == nil {
|
||||||
return c
|
return c
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -102,7 +102,7 @@ type packetConn struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func WrapPacketConn(service string, pc net.PacketConn) net.PacketConn {
|
func WrapPacketConn(service string, pc net.PacketConn) net.PacketConn {
|
||||||
if !xmetrics.IsEnabled() || pc == nil {
|
if pc == nil {
|
||||||
return pc
|
return pc
|
||||||
}
|
}
|
||||||
return &packetConn{
|
return &packetConn{
|
||||||
|
|||||||
Reference in New Issue
Block a user