Struct conjure_runtime::HostMetrics

source ·
pub struct HostMetrics { /* private fields */ }
Expand description

Metrics about requests made to a specific host of a service.

Implementations§

source§

impl HostMetrics

source

pub fn service_name(&self) -> &str

Returns the name of the service running on this host.

source

pub fn hostname(&self) -> &str

Returns the hostname of the node.

source

pub fn port(&self) -> u16

Returns the port of the node.

source

pub fn last_update(&self) -> Instant

Returns the time of the last update to the node’s health metrics.

source

pub fn response_1xx(&self) -> &Timer

Returns a timer recording requests to this host which returned a 1xx HTTP response.

source

pub fn response_2xx(&self) -> &Timer

Returns a timer recording requests to this host which returned a 2xx HTTP response.

source

pub fn response_3xx(&self) -> &Timer

Returns a timer recording requests to this host which returned a 3xx HTTP response.

source

pub fn response_4xx(&self) -> &Timer

Returns a timer recording requests to this host which returned a 4xx HTTP response (other than 429).

source

pub fn response_5xx(&self) -> &Timer

Returns a timer recording requests to this host which returned a 5xx HTTP response (other than 503).

source

pub fn response_qos(&self) -> &Timer

Returns a timer recording requests to this host which returned a QoS error (a 429 or 503).

source

pub fn response_other(&self) -> &Timer

Returns a timer recording requests to this host which returned an HTTP response not in the range 100-599.

source

pub fn io_error(&self) -> &Meter

Returns a meter recording requests to this host which returned an IO error.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more