pub struct DispatchInfo {Show 17 fields
pub method: String,
pub method_type: &'static str,
pub server_id: String,
pub protocol: String,
pub protocol_hash: String,
pub protocol_version: String,
pub request_id: String,
pub transport_metadata: Arc<Metadata>,
pub principal: String,
pub auth_domain: String,
pub authenticated: bool,
pub remote_addr: String,
pub http_status: u16,
pub request_data: Vec<u8>,
pub stream_id: String,
pub cancelled: bool,
pub claims: BTreeMap<String, String>,
}Expand description
Information passed to a dispatch hook at start and end of each call.
Fields§
§method: String§method_type: &'static str§server_id: String§protocol: StringLogical service / protocol name.
protocol_hash: StringSHA-256 hex of the canonical describe payload (always required in access log).
protocol_version: StringOperator-supplied free-form protocol-contract version label (optional).
request_id: String§transport_metadata: Arc<Metadata>Transport-level metadata (HTTP peer addr / pipe contextvar payload).
principal: StringAuthenticated principal name, empty when anonymous.
auth_domain: StringAuthentication domain identifier, empty when anonymous.
authenticated: boolTrue when the call was authenticated.
remote_addr: StringHTTP transport: remote IP:port. Empty otherwise.
http_status: u16HTTP transport: response status; 0 when not applicable.
request_data: Vec<u8>Self-contained Arrow IPC stream of the request batch (unary + stream init only).
stream_id: StringStream lifecycle identifier (32-char lowercase hex); empty on unary.
cancelled: boolTrue when a stream was cancelled by the client.
claims: BTreeMap<String, String>Authentication claims — e.g. decoded JWT claims, X.509 cert
extensions, OAuth introspection fields. Cloned from
AuthContext::claims at
dispatch start. Used by the Sentry hook to enrich user / tag
fields per Python 2d93987.
Implementations§
Source§impl DispatchInfo
impl DispatchInfo
Sourcepub fn from_request(
server: &RpcServer,
req: &Request,
method_type: &'static str,
auth: &AuthContext,
) -> Self
pub fn from_request( server: &RpcServer, req: &Request, method_type: &'static str, auth: &AuthContext, ) -> Self
Build a DispatchInfo from the serving server + request + resolved
auth context. method_type is either "unary" or "stream".
Trait Implementations§
Source§impl Clone for DispatchInfo
impl Clone for DispatchInfo
Source§fn clone(&self) -> DispatchInfo
fn clone(&self) -> DispatchInfo
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more