#[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>,
pub tenant: 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; for a streaming method, to the stream’s end (the span’s lifetime), as the semantic conventions ask.
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
status_code, when the binding’s semantic conventions count it as a
server failure — every JSON-RPC code; a 5xx, not a 4xx; gRPC’s
UNKNOWN, DEADLINE_EXCEEDED, UNIMPLEMENTED, INTERNAL,
UNAVAILABLE and DATA_LOSS, not NOT_FOUND — or cancelled for a
call dropped before it finished. A GetTask for an unknown task over
gRPC is status_code NOT_FOUND with no error_type.
tenant: Option<&'a str>The tenant the call was resolved to, when the handler resolved one
(None for a call refused before that, or with no tenant). Not
bounded by itself: an implementation that labels by it bounds it, as
OtelMetrics::with_tenant_dimension does with an allow-list.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Forget for RpcCall<'a>
impl<'a> Freeze for RpcCall<'a>
impl<'a> Move 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§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§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 more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].