Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpcdaemon: add support for rotating log files of external interfaces #1784

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

canepat
Copy link
Member

@canepat canepat commented Jan 29, 2024

This PR introduces a new abstraction to produce rotating log files tailored for external interfaces (e.g. JSON-RPC API), which means logging incoming requests and outgoing responses, possibly filtered according to some application-level need (e.g. slow latency request/response, whatever slow means depending on the context). The proposed implementation relies on usage of spdlog, choosing the best performance-wise library is left as a further optimisation, if proven necessary.

The foreseen usages are:

  • adding a command-line option to enable interface logging for Engine API endpoint: when enabled, it seems reasonable to log all requests/responses for debugging purposes
  • adding some command-line options to enable interface logging for Execution API endpoint: when enabled, it can be useful to log only request/response with latency greater than some specified threshold (e.g. only request/response taking more than 30sec to be served) or some specific API for debugging purposes (e.g. only eth_call)

This PR doesn't introduce any activation or usage of the feature yet.

Moreover, the following minor changes are added:

  • infra: default settings in logging initialisation function
  • conan: fix some linter warnings

infra: add default settings in logging initialization
conan: add spdlog dependency
@canepat canepat added the enhancement New feature or improvement label Jan 29, 2024
@canepat canepat merged commit a429313 into master Jan 31, 2024
14 checks passed
@canepat canepat deleted the ci/rpcdaemon_add_interface_log branch January 31, 2024 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants