diff --git a/.changelog/10951.txt b/.changelog/10951.txt new file mode 100644 index 000000000..0ca2b4401 --- /dev/null +++ b/.changelog/10951.txt @@ -0,0 +1,3 @@ +```release-note:improvement +consul/connect: Reduced the noise of log messages emitted for connect native tasks +``` diff --git a/client/allocrunner/consul_grpc_sock_hook.go b/client/allocrunner/consul_grpc_sock_hook.go index 91014fedc..07fe6ef47 100644 --- a/client/allocrunner/consul_grpc_sock_hook.go +++ b/client/allocrunner/consul_grpc_sock_hook.go @@ -313,10 +313,10 @@ func proxyConn(ctx context.Context, logger hclog.Logger, destAddr string, conn n defer cancel() n, err := io.Copy(dest, conn) if ctx.Err() == nil && err != nil { - logger.Warn("error proxying to Consul", "error", err, "dest", destAddr, - "src_local", conn.LocalAddr(), "src_remote", conn.RemoteAddr(), - "bytes", n, - ) + // expect disconnects when proxying http + logger.Trace("error message received proxying to Consul", + "msg", err, "dest", destAddr, "src_local", conn.LocalAddr(), + "src_remote", conn.RemoteAddr(), "bytes", n) return } logger.Trace("proxy to Consul complete", @@ -332,10 +332,9 @@ func proxyConn(ctx context.Context, logger hclog.Logger, destAddr string, conn n defer cancel() n, err := io.Copy(conn, dest) if ctx.Err() == nil && err != nil { - logger.Warn("error proxying from Consul", "error", err, "dest", destAddr, - "src_local", conn.LocalAddr(), "src_remote", conn.RemoteAddr(), - "bytes", n, - ) + logger.Trace("error message received proxying from Consul", + "msg", err, "dest", destAddr, "src_local", conn.LocalAddr(), + "src_remote", conn.RemoteAddr(), "bytes", n) return } logger.Trace("proxy from Consul complete",