Skip to content

Commit 164b458

Browse files
committed
move logs to debug level to mitigate lock contention
1 parent f9c200a commit 164b458

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

proxy/http.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func (h *ProxyHandler) proxyHttp(ctx context.Context, clientConn *tls.Conn, prox
4242
"shardID": proxyConn.shardID,
4343
"error": err,
4444
"URI": req.RequestURI,
45-
}).Error("proxy error")
45+
}).Debug("proxy error")
4646
handleHttpError(err, w, req)
4747
},
4848

@@ -229,7 +229,7 @@ func handleHttpError(err error, w http.ResponseWriter, r *http.Request) {
229229
log.WithFields(log.Fields{
230230
"origError": err.Error(),
231231
"templateError": writeErr.Error(),
232-
}).Warn("failed to write error response body")
232+
}).Debug("failed to write error response body")
233233
}
234234
}
235235

proxy/proxy.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ func (ps *ProxyServer) Run() error {
149149
log.WithFields(log.Fields{
150150
"error": hsErr,
151151
"clientAddr": conn.RemoteAddr(),
152-
}).Info("tls handshake error")
152+
}).Debug("tls handshake error")
153153
return
154154
}
155155
var state = conn.(*tls.Conn).ConnectionState()
@@ -471,15 +471,15 @@ func (h *ProxyHandler) handleProxyConnection(ctx context.Context, conn *tls.Conn
471471
"clientAddr": clientAddr,
472472
"proto": state.NegotiatedProtocol,
473473
"shard": shardID,
474-
}).Warn("failed to proxy connection")
474+
}).Debug("failed to proxy connection")
475475
} else {
476476
ProxyConnectionsClosedCounter.WithLabelValues(shardID, portStr, "ok").Inc()
477477
log.WithFields(log.Fields{
478478
"sni": sni,
479479
"clientAddr": clientAddr,
480480
"proto": state.NegotiatedProtocol,
481481
"shard": shardID,
482-
}).Info("finished proxy connection")
482+
}).Debug("finished proxy connection")
483483
}
484484
}
485485

@@ -540,7 +540,7 @@ func (h *ProxyHandler) proxyConnection(ctx context.Context, conn *tls.Conn, sni
540540
"clientAddr": clientAddr,
541541
"reactorAddr": reactorAddr,
542542
"proto": negotiatedProto,
543-
}).Info("starting to proxy connection data")
543+
}).Debug("starting to proxy connection data")
544544

545545
// We're finally ready to copy the data between the connection and our grpc streaming rpc.
546546
if isHttp(negotiatedProto) {
@@ -560,7 +560,7 @@ func proxyTcp(ctx context.Context, clientConn *tls.Conn, proxyConn *ProxyConnect
560560
"hostname": proxyConn.hostname,
561561
"error": e,
562562
"outgoingBytes": outgoingBytes,
563-
}).Warn("copyProxyResponseData completed with error")
563+
}).Debug("copyProxyResponseData completed with error")
564564
return e
565565
} else {
566566
log.WithFields(log.Fields{
@@ -579,7 +579,7 @@ func proxyTcp(ctx context.Context, clientConn *tls.Conn, proxyConn *ProxyConnect
579579
"hostname": proxyConn.hostname,
580580
"error": e,
581581
"incomingBytes": incomingBytes,
582-
}).Warn("copyProxyRequestData completed with error")
582+
}).Debug("copyProxyRequestData completed with error")
583583
return e
584584
} else {
585585
log.WithFields(log.Fields{

0 commit comments

Comments
 (0)