diff --git a/.changeset/flat-goats-itch.md b/.changeset/flat-goats-itch.md new file mode 100644 index 0000000000000..d8e07be943c9c --- /dev/null +++ b/.changeset/flat-goats-itch.md @@ -0,0 +1,5 @@ +--- +'@eth-optimism/proxyd': patch +--- + +proxyd: Reduced RPC request logging diff --git a/go/proxyd/server.go b/go/proxyd/server.go index 3e86074920069..41fcef431ef11 100644 --- a/go/proxyd/server.go +++ b/go/proxyd/server.go @@ -27,7 +27,7 @@ const ( MaxBatchRPCCalls = 100 cacheStatusHdr = "X-Proxyd-Cache-Status" defaultServerTimeout = time.Second * 10 - maxLogLength = 1000 + maxLogLength = 2000 ) type Server struct { @@ -151,6 +151,12 @@ func (s *Server) HandleRPC(w http.ResponseWriter, r *http.Request) { } RecordRequestPayloadSize(ctx, len(body)) + log.Info("Raw RPC request", + "body", truncate(string(body)), + "req_id", GetReqID(ctx), + "auth", GetAuthCtx(ctx), + ) + if IsBatch(body) { reqs, err := ParseBatchRPCReq(body) if err != nil { @@ -238,12 +244,6 @@ func (s *Server) handleSingleRPC(ctx context.Context, req *RPCReq) (*RPCRes, boo return NewRPCErrorRes(req.ID, ErrMethodNotWhitelisted), false } - log.Info("RPC request", - "method", req.Method, - "params", truncate(string(req.Params)), - "id", truncate(string(req.ID)), - ) - var backendRes *RPCRes backendRes, err := s.cache.GetRPC(ctx, req) if err != nil {