diff --git a/proxy/http.go b/proxy/http.go index 1b662c9..bbad602 100644 --- a/proxy/http.go +++ b/proxy/http.go @@ -675,7 +675,7 @@ func (p *HTTP) execProxyJob(job *proxyJob) { job.log.Error("Failed to proxy the request", loggedFields...) } else if job.triage.Proxy { metrics.ProxySuccessCount.Add(context.TODO(), 1, metricAttributes) - job.log.Info("Proxied the request", loggedFields...) + job.log.Debug("Proxied the request", loggedFields...) } else { metrics.ProxyFakeCount.Add(context.TODO(), 1, metricAttributes) job.log.Info("Faked the request", loggedFields...) @@ -706,6 +706,7 @@ func (p *HTTP) execMirrorJob(job *mirrorJob) { ) } else { loggedFields = append(loggedFields, + zap.NamedError("error_unmarshal", err), zap.String("http_request", utils.Str(job.req.Body())), ) } @@ -767,7 +768,7 @@ func (p *HTTP) execMirrorJob(job *mirrorJob) { ) if err == nil { - job.log.Info("Mirrored the request", loggedFields...) + job.log.Debug("Mirrored the request", loggedFields...) metrics.MirrorSuccessCount.Add(context.TODO(), 1, metricAttributes) } else { job.log.Error("Failed to mirror the request", loggedFields...) diff --git a/proxy/websocket_pump.go b/proxy/websocket_pump.go index a5502b4..5293eb9 100644 --- a/proxy/websocket_pump.go +++ b/proxy/websocket_pump.go @@ -5,6 +5,7 @@ import ( "encoding/hex" "encoding/json" "errors" + "fmt" "math/rand/v2" "strings" "sync/atomic" @@ -246,12 +247,12 @@ func (p *websocketPump) pumpMessages( } if err := to.SetWriteDeadline(utils.Deadline(timeout)); err != nil { - notifyOnFailure(err) + notifyOnFailure(fmt.Errorf("set write deadline (msg_type=%d, msg_size=%d): %w", m.msgType, len(m.bytes), err)) continue } if err := to.WriteMessage(m.msgType, m.bytes); err != nil { - notifyOnFailure(err) + notifyOnFailure(fmt.Errorf("write message (msg_type=%d, msg_size=%d): %w", m.msgType, len(m.bytes), err)) continue } @@ -261,7 +262,7 @@ func (p *websocketPump) pumpMessages( attribute.KeyValue{Key: "direction", Value: attribute.StringValue(direction)}, )) - l.Info("Proxied message", p.prepareLogFields(m, loggedFields...)...) + l.Debug("Proxied message", p.prepareLogFields(m, loggedFields...)...) } } } @@ -314,7 +315,6 @@ func (p *websocketPump) prepareLogFields( Nonce: tx.Nonce(), }) } else { - _, _, err := jrpc.DecodeEthRawTransaction(strTx) errs = append(errs, err) }