pub struct RustRabbitMetrics { /* private fields */ }Expand description
Metrics collector for RustRabbit operations
Implementations§
Source§impl RustRabbitMetrics
impl RustRabbitMetrics
Sourcepub fn with_registry(registry: Arc<Registry>) -> Result<Self, Error>
pub fn with_registry(registry: Arc<Registry>) -> Result<Self, Error>
Create a new metrics instance with custom registry
Sourcepub fn record_message_published(
&self,
queue: &str,
exchange: &str,
routing_key: &str,
)
pub fn record_message_published( &self, queue: &str, exchange: &str, routing_key: &str, )
Record a published message
Sourcepub fn record_message_consumed(
&self,
queue: &str,
consumer_tag: &str,
success: bool,
)
pub fn record_message_consumed( &self, queue: &str, consumer_tag: &str, success: bool, )
Record a consumed message
Sourcepub fn record_message_failed(
&self,
queue: &str,
error_type: &str,
retry_attempt: u32,
)
pub fn record_message_failed( &self, queue: &str, error_type: &str, retry_attempt: u32, )
Record a failed message processing
Sourcepub fn record_message_retry(&self, queue: &str, retry_reason: &str)
pub fn record_message_retry(&self, queue: &str, retry_reason: &str)
Record a message retry
Sourcepub fn record_processing_duration(
&self,
queue: &str,
consumer_tag: &str,
duration: Duration,
)
pub fn record_processing_duration( &self, queue: &str, consumer_tag: &str, duration: Duration, )
Record message processing duration
Sourcepub fn record_publish_duration(
&self,
queue: &str,
exchange: &str,
duration: Duration,
)
pub fn record_publish_duration( &self, queue: &str, exchange: &str, duration: Duration, )
Record message publish duration
Sourcepub fn update_connection_pool(&self, total: i64, healthy: i64, unhealthy: i64)
pub fn update_connection_pool(&self, total: i64, healthy: i64, unhealthy: i64)
Update connection pool metrics
Sourcepub fn record_connection_attempt(&self)
pub fn record_connection_attempt(&self)
Record a connection attempt
Sourcepub fn record_connection_failure(&self)
pub fn record_connection_failure(&self)
Record a connection failure
Sourcepub fn update_queue_depth(&self, queue: &str, depth: i64)
pub fn update_queue_depth(&self, queue: &str, depth: i64)
Update queue depth
Sourcepub fn update_consumer_count(&self, queue: &str, count: i64)
pub fn update_consumer_count(&self, queue: &str, count: i64)
Update consumer count
Sourcepub fn record_health_check_duration(&self, duration: Duration)
pub fn record_health_check_duration(&self, duration: Duration)
Record health check duration
Trait Implementations§
Source§impl Clone for RustRabbitMetrics
impl Clone for RustRabbitMetrics
Source§fn clone(&self) -> RustRabbitMetrics
fn clone(&self) -> RustRabbitMetrics
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RustRabbitMetrics
impl Debug for RustRabbitMetrics
Auto Trait Implementations§
impl Freeze for RustRabbitMetrics
impl !RefUnwindSafe for RustRabbitMetrics
impl Send for RustRabbitMetrics
impl Sync for RustRabbitMetrics
impl Unpin for RustRabbitMetrics
impl !UnwindSafe for RustRabbitMetrics
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
Mutably borrows from an owned value. Read more