pub struct ServerMetrics { /* private fields */ }Expand description
Always-on HTTP + lifecycle counters. Request cells are keyed by
(status_class, cache_result); the rest are scalar totals.
Implementations§
Source§impl ServerMetrics
impl ServerMetrics
Sourcepub fn record_request(&self, status: u16, bytes: u64)
pub fn record_request(&self, status: u16, bytes: u64)
Record a finished HTTP request: its status class (2xx…), the coarse
cache result derived from the status, and the bytes streamed back.
Sourcepub fn record_deployment(&self)
pub fn record_deployment(&self)
Record a deployment manifest having been created.
Sourcepub fn record_activation(&self)
pub fn record_activation(&self)
Record a deployment activation (the live/alias pointer flip).
Sourcepub fn record_cert_renewal(&self)
pub fn record_cert_renewal(&self)
Record a TLS certificate (re)issue (ACME issuance / renewal).
Sourcepub fn render_prometheus(&self) -> String
pub fn render_prometheus(&self) -> String
Render the counters in Prometheus text exposition format.
Trait Implementations§
Source§impl Default for ServerMetrics
impl Default for ServerMetrics
Source§fn default() -> ServerMetrics
fn default() -> ServerMetrics
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for ServerMetrics
impl RefUnwindSafe for ServerMetrics
impl Send for ServerMetrics
impl Sync for ServerMetrics
impl Unpin for ServerMetrics
impl UnsafeUnpin for ServerMetrics
impl UnwindSafe for ServerMetrics
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> ⓘ
Converts
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> ⓘ
Converts
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