pub struct HttpMetric {
pub capability: String,
pub host: String,
pub duration_ms: u64,
pub status: u16,
pub bytes: u64,
pub outcome: &'static str,
}Expand description
One completed HTTP host operation, handed to MetricsSink::http_operation
after the transport returns (success or failure).
Fields§
§capability: StringThe gated capability that ran: http.get, http.post, http.download, …
host: StringDestination host from the request URL (e.g. api.example.com); empty when
the URL doesn’t parse.
duration_ms: u64Wall-clock of the network transport — send plus capped body read for a
request, or stream-plus-fsync for a download. Excludes arg marshalling.
status: u16HTTP status, or 0 if the request failed before any response arrived.
bytes: u64Bytes received: response-body length, or bytes written for a download.
outcome: &'static strBounded outcome class: ok, error, timeout, or too_large.
Trait Implementations§
Source§impl Clone for HttpMetric
impl Clone for HttpMetric
Auto Trait Implementations§
impl Freeze for HttpMetric
impl RefUnwindSafe for HttpMetric
impl Send for HttpMetric
impl Sync for HttpMetric
impl Unpin for HttpMetric
impl UnsafeUnpin for HttpMetric
impl UnwindSafe for HttpMetric
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
Mutably borrows from an owned value. Read more