Skip to content

Add Request Parameters to RPC logging #22025

@MysticRyuujin

Description

@MysticRyuujin

Rationale

When a JSON-RPC request is sent to the node, it would be nice to be able to capture a log of the parameters that were sent.

Currently, even at maximum verbosity level, all JSON-RPC requests seem to be logged at DEBUG level at the time the request is served:

DEBUG[12-15|16:41:42.323] Served eth_getBlockByNumber         conn=192.168.15.20:56660 reqid=1 t="573.915µs"
DEBUG[12-15|16:43:52.926] Served eth_getTransactionByHash     conn=192.168.10.50:37144 reqid=1 t=2.481519ms

And as you can see, there's no indication what block was requested, what transaction hash was requested, etc.

Implementation

I think it would make sense to add the rpc request parameters under DETAIL level (or DEBUG, whatever makes sense)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions