Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Trace response payload in default jsonrpsee middleware #12886

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion client/rpc-servers/src/middleware.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,9 @@ impl RpcMiddleware {
}

/// Called once the JSON-RPC request is finished and response is sent to the output buffer.
fn on_response(&self, _result: &str, started_at: std::time::Instant) {
fn on_response(&self, result: &str, started_at: std::time::Instant) {
log::trace!(target: "rpc_metrics", "[{}] on_response started_at={:?}", self.transport_label, started_at);
log::trace!(target: "rpc_metrics::extra", "[{}] result={:?}", self.transport_label, result);
self.metrics.requests_finished.with_label_values(&[self.transport_label]).inc();
}
}
Expand Down