pub struct RuntimeMetricsReporter { /* private fields */ }
Available on crate features
rt
and metrics-rs-integration
only.Expand description
Collects metrics from a Tokio runtime and uploads them to metrics_rs.
Implementations§
Source§impl RuntimeMetricsReporter
impl RuntimeMetricsReporter
Sourcepub fn run_once(&mut self)
pub fn run_once(&mut self)
Collect and publish metrics once to the configured metrics_rs reporter.
Sourcepub async fn run(self)
pub async fn run(self)
Collect and publish metrics periodically to the configured metrics_rs reporter.
You probably want to run this within its own task (using tokio::task::spawn
)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RuntimeMetricsReporter
impl !RefUnwindSafe for RuntimeMetricsReporter
impl Send for RuntimeMetricsReporter
impl Sync for RuntimeMetricsReporter
impl Unpin for RuntimeMetricsReporter
impl !UnwindSafe for RuntimeMetricsReporter
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