pub struct HostMetrics {
pub handle_rpc_message_duration_ns: Histogram<u64>,
pub component_invocations: Counter<u64>,
pub component_errors: Counter<u64>,
pub component_active_instances: UpDownCounter<i64>,
pub component_max_instances: Gauge<u64>,
pub system_total_memory_bytes: ObservableGauge<u64>,
pub system_used_memory_bytes: ObservableGauge<u64>,
pub system_cpu_usage: ObservableGauge<f64>,
pub host_id: String,
pub lattice_id: String,
/* private fields */
}Expand description
HostMetrics encapsulates the set of metrics emitted by the wasmcloud host
Fields§
§handle_rpc_message_duration_ns: Histogram<u64>Represents the time it took for each handle_rpc_message invocation in nanoseconds.
component_invocations: Counter<u64>The count of the number of times an component was invoked.
component_errors: Counter<u64>The count of the number of times an component invocation resulted in an error.
component_active_instances: UpDownCounter<i64>The number of active instances of a component.
component_max_instances: Gauge<u64>The maximum number of instances of a component.
system_total_memory_bytes: ObservableGauge<u64>The total amount of available system memory in bytes.
system_used_memory_bytes: ObservableGauge<u64>The total amount of used system memory in bytes.
system_cpu_usage: ObservableGauge<f64>The total cpu usage.
host_id: StringThe host’s ID.
lattice_id: StringThe host’s lattice ID.
Implementations§
Source§impl HostMetrics
impl HostMetrics
Sourcepub fn new(
meter: &Meter,
host_id: String,
lattice_id: String,
refresh_time: Option<Duration>,
) -> Result<Self>
pub fn new( meter: &Meter, host_id: String, lattice_id: String, refresh_time: Option<Duration>, ) -> Result<Self>
Construct a new HostMetrics instance for accessing the various wasmcloud host metrics
linked to the provided meter.
The refresh_time is optional and defaults to 5 seconds. This time is used to configure how
often system level metrics are refreshed
Trait Implementations§
Source§impl Clone for HostMetrics
impl Clone for HostMetrics
Source§fn clone(&self) -> HostMetrics
fn clone(&self) -> HostMetrics
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for HostMetrics
impl !RefUnwindSafe for HostMetrics
impl Send for HostMetrics
impl Sync for HostMetrics
impl Unpin for HostMetrics
impl !UnwindSafe for HostMetrics
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§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
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> GetSetFdFlags for T
impl<T> GetSetFdFlags for T
Source§fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
fn get_fd_flags(&self) -> Result<FdFlags, Error>where
T: AsFilelike,
self file descriptor.Source§fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
fn new_set_fd_flags(&self, fd_flags: FdFlags) -> Result<SetFdFlags<T>, Error>where
T: AsFilelike,
Source§fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
fn set_fd_flags(&mut self, set_fd_flags: SetFdFlags<T>) -> Result<(), Error>where
T: AsFilelike,
self file descriptor. Read moreSource§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::RequestSource§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