-
Notifications
You must be signed in to change notification settings - Fork 131
feat(l1): rpc instrumentation and panels #5311
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
Changes from all commits
8e6dc0b
5b5e3d6
042b266
e873b85
cc97128
14dbeaf
01bab1e
6dc47b9
d0885bb
6f82153
1b6cefa
c7d20d6
fe92933
bc00add
86fccd8
5968fd3
f75a0ac
6c4a9f5
024b3f7
c51eeea
35d9cbd
28ec41f
6e5b041
f6a401b
cd1534d
2948d97
39bd789
5b167ab
e890efa
bd95d31
89f1a09
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -55,6 +55,7 @@ use bytes::Bytes; | |
| use ethrex_blockchain::Blockchain; | ||
| use ethrex_blockchain::error::ChainError; | ||
| use ethrex_common::types::Block; | ||
| use ethrex_metrics::profiling::record_async_duration; | ||
| use ethrex_p2p::peer_handler::PeerHandler; | ||
| use ethrex_p2p::sync_manager::SyncManager; | ||
| use ethrex_p2p::types::Node; | ||
|
|
@@ -191,7 +192,15 @@ pub trait RpcHandler: Sized { | |
|
|
||
| async fn call(req: &RpcRequest, context: RpcApiContext) -> Result<Value, RpcErr> { | ||
| let request = Self::parse(&req.params)?; | ||
| request.handle(context).await | ||
| let namespace = match req.namespace() { | ||
| Ok(RpcNamespace::Engine) => "engine", | ||
| _ => "rpc", | ||
| }; | ||
|
|
||
| record_async_duration(namespace, req.method.as_str(), async move { | ||
| request.handle(context).await | ||
| }) | ||
|
Comment on lines
+200
to
+202
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We might want to have this behind the metrics feature flag maybe? I'll take a look at how the rest of the instrumentation was working with the previous breakdown panels and in any case create an issue to follow-up on this. |
||
| .await | ||
| } | ||
|
|
||
| async fn handle(&self, context: RpcApiContext) -> Result<Value, RpcErr>; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.