#[non_exhaustive]pub struct RpcCall<'a> {
pub system: &'a str,
pub method: Option<&'a str>,
pub duration: Duration,
pub status_code: Option<&'a str>,
pub error_type: Option<&'a str>,
}Expand description
One finished inbound call, as Metrics::on_rpc_call reports it.
Every field is a bounded, low-cardinality value, safe as a metric attribute: nothing here is a task id, a message, or a string the peer chose.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.system: &'a strThe binding, as rpc.system.name: jsonrpc (JSON-RPC over HTTP or
WebSocket), a2a_http_json, or grpc.
method: Option<&'a str>The method, as rpc.method: fully qualified
(lf.a2a.v1.A2AService/SendMessage) or _OTHER for one the server
does not serve. None when the request was refused before it named
one — a body that is not JSON-RPC, a batch over the limit.
duration: DurationFrom receipt to the response, or to the stream being established for a streaming method — not to the stream’s end.
status_code: Option<&'a str>The status the binding answered with, as rpc.status_code: the
JSON-RPC error code (-32001), the HTTP status (404), or the gRPC
status name (NOT_FOUND, and OK on success). None on success for
the bindings that send no status code for one.
error_type: Option<&'a str>Set if and only if the call failed, as error.type: the failing
status_code, or cancelled for a call dropped before it finished.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for RpcCall<'a>
impl<'a> RefUnwindSafe for RpcCall<'a>
impl<'a> Send for RpcCall<'a>
impl<'a> Sync for RpcCall<'a>
impl<'a> Unpin for RpcCall<'a>
impl<'a> UnsafeUnpin for RpcCall<'a>
impl<'a> UnwindSafe for RpcCall<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request