erigon-pulse/rpc
Dmytro a63b89334b
added logging for slow RPC requests (#8818)
Changed distribution of httpcfg.HttpCfg to be pointer.
Added new flags:
rpc.slow.log - which is false by default, this flag need to enable
logging slow RPC requests
rpc.slow.log.threshold - which is 100 by default, this flag specify slow
threshold in milliseconds
Updated rpc handler to log slow requests:
- added map[request id] {method, timestamp}
- put every request details to map above
- delete request details from map above
- added time interval check for elements in map and if time difference
is more than given threshold print request id and the method
- app will print slow requests in next cases:
1. As soon as request take more than given threshold
2. Every 20 seconds if request still in process
3. After request finished and it took more than give threshold

---------

Co-authored-by: alex.sharov <AskAlexSharov@gmail.com>
2023-11-28 16:11:39 +07:00
..
rpccfg added logging for slow RPC requests (#8818) 2023-11-28 16:11:39 +07:00
testdata RPC: batch - preserve order, streaming to in-mem buf (#2541) 2021-08-19 09:26:06 +07:00
allow_list_test.go Granular rpc control (Allow list for RPC daemon) (#1341) 2020-11-10 10:08:42 +01:00
allow_list.go rpc: fix implemented filter methods being forbidden (#5801) 2022-10-26 09:08:09 +07:00
client_example_test.go Sentinel refactor (#8296) 2023-10-22 01:17:18 +02:00
client_test.go [devnet tool] Separate logging (#7553) 2023-05-20 14:48:16 +01:00
client.go added logging for slow RPC requests (#8818) 2023-11-28 16:11:39 +07:00
doc.go go1.19 gofmt (#4988) 2022-08-10 19:04:13 +07:00
endpoints.go remove ipc package (#2405) 2021-07-20 15:34:04 +07:00
errors.go Support engine_forkchoiceUpdatedV3 with ParentBeaconBlockRoot (EIP-4788) (#7969) 2023-08-06 11:54:14 +02:00
handler_test.go check for nil before returning invalid json in rpc streaming calls (#7104) 2023-03-14 11:07:53 +00:00
handler.go added logging for slow RPC requests (#8818) 2023-11-28 16:11:39 +07:00
helpers.go Rpcdaemon as lib (#940) 2020-08-19 12:46:20 +01:00
http_test.go added logging for slow RPC requests (#8818) 2023-11-28 16:11:39 +07:00
http.go dvovk/tunnelwws (#8745) 2023-11-16 16:37:29 +00:00
inproc.go [devnet tool] Separate logging (#7553) 2023-05-20 14:48:16 +01:00
ipc.go Apache licensed logger (#2460) 2021-07-29 17:23:23 +07:00
json.go dvovk/tunnelwws (#8745) 2023-11-16 16:37:29 +00:00
metrics.go Sentinel refactor (#8296) 2023-10-22 01:17:18 +02:00
server_test.go added logging for slow RPC requests (#8818) 2023-11-28 16:11:39 +07:00
server.go added logging for slow RPC requests (#8818) 2023-11-28 16:11:39 +07:00
service.go rpc service and stageloop logger updates (#7696) 2023-06-10 07:39:39 +01:00
stdio.go [devnet tool] Separate logging (#7553) 2023-05-20 14:48:16 +01:00
subscription_test.go added logging for slow RPC requests (#8818) 2023-11-28 16:11:39 +07:00
subscription.go dvovk/tunnelwws (#8745) 2023-11-16 16:37:29 +00:00
testservice_test.go added logging for slow RPC requests (#8818) 2023-11-28 16:11:39 +07:00
types_test.go reference hash, address, and chain config from lib (#6536) 2023-01-13 18:12:18 +00:00
types.go Bor proofgen tests (#8751) 2023-11-17 10:41:45 +00:00
websocket_bench_test.go Caplin block persistence (#7941) 2023-08-09 01:21:19 +02:00
websocket_test.go added logging for slow RPC requests (#8818) 2023-11-28 16:11:39 +07:00
websocket.go dvovk/tunnelwws (#8745) 2023-11-16 16:37:29 +00:00