Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions proxy/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -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...)
Expand Down Expand Up @@ -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())),
)
}
Expand Down Expand Up @@ -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...)
Expand Down
8 changes: 4 additions & 4 deletions proxy/websocket_pump.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"encoding/hex"
"encoding/json"
"errors"
"fmt"
"math/rand/v2"
"strings"
"sync/atomic"
Expand Down Expand Up @@ -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
}

Expand All @@ -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...)...)
}
}
}
Expand Down Expand Up @@ -314,7 +315,6 @@ func (p *websocketPump) prepareLogFields(
Nonce: tx.Nonce(),
})
} else {
_, _, err := jrpc.DecodeEthRawTransaction(strTx)
errs = append(errs, err)
}

Expand Down