pub struct RpcCallEvent {
pub caller: u64,
pub callee: u64,
pub method: String,
pub latency_ms: u32,
pub status: RpcCallStatus,
pub request_bytes: u32,
pub response_bytes: u32,
pub direction: RpcDirection,
pub ts_unix_ms: u64,
}Expand description
Single observed RPC boundary. All fields are populated from the substrate’s call path at fire time; the observer must not mutate them (the type is owned for cheap per-call construction).
Fields§
§caller: u64The 64-bit node id of the calling node. Equal to
local_node_id on Outbound events.
callee: u64The 64-bit node id of the responding node.
method: StringService / method name as passed into call_typed or
registered via serve_rpc_typed.
latency_ms: u32Wall-clock-equivalent elapsed time between request send
(caller side) or dispatch (server side) and the
observation point. Truncated to ms — observers in this
codebase don’t need ns resolution and u32 keeps the
struct compact.
status: RpcCallStatusOutcome of the call at the observation point.
request_bytes: u32Wire payload size of the request body (excluding the
24-byte EventMeta prefix). 0 when not available
(transport-error branches before the body was framed).
response_bytes: u32Wire payload size of the response body. 0 when not available (timeout, transport error, or cancellation before the response arrived).
direction: RpcDirectionWhether the observation came from the caller side
(Outbound) or the server side (Inbound).
ts_unix_ms: u64Unix-ms timestamp captured at fire time. Best-effort (pre-1970 clocks read 0).
Trait Implementations§
Source§impl Clone for RpcCallEvent
impl Clone for RpcCallEvent
Source§fn clone(&self) -> RpcCallEvent
fn clone(&self) -> RpcCallEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more