pub struct CompositeMetricsCollector { /* private fields */ }Expand description
A MetricsCollector that fans every observation out to a list of collectors,
in registration order.
Built by MetricsHandle::register — the second registration stores a
composite of [first, second]; a third composes over that composite, so
ordering and prior observation are preserved (composition, not replacement).
Implementations§
Source§impl CompositeMetricsCollector
impl CompositeMetricsCollector
Sourcepub fn new(collectors: Vec<Arc<dyn MetricsCollector>>) -> Self
pub fn new(collectors: Vec<Arc<dyn MetricsCollector>>) -> Self
Creates a composite that delegates to collectors in order.
Trait Implementations§
Source§impl MetricsCollector for CompositeMetricsCollector
impl MetricsCollector for CompositeMetricsCollector
Source§fn record_exchange_duration(&self, route_id: &str, duration: Duration)
fn record_exchange_duration(&self, route_id: &str, duration: Duration)
Record exchange processing time
Source§fn increment_errors(&self, route_id: &str, error_type: &str)
fn increment_errors(&self, route_id: &str, error_type: &str)
Increment error counter
Source§fn increment_exchanges(&self, route_id: &str)
fn increment_exchanges(&self, route_id: &str)
Increment exchange counter
Source§fn set_queue_depth(&self, route_id: &str, depth: usize)
fn set_queue_depth(&self, route_id: &str, depth: usize)
Update queue depth
Source§fn record_circuit_breaker_change(&self, route_id: &str, from: &str, to: &str)
fn record_circuit_breaker_change(&self, route_id: &str, from: &str, to: &str)
Record circuit breaker state change
Auto Trait Implementations§
impl !RefUnwindSafe for CompositeMetricsCollector
impl !UnwindSafe for CompositeMetricsCollector
impl Freeze for CompositeMetricsCollector
impl Send for CompositeMetricsCollector
impl Sync for CompositeMetricsCollector
impl Unpin for CompositeMetricsCollector
impl UnsafeUnpin for CompositeMetricsCollector
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