pub struct MonitoringOperations<'a> { /* private fields */ }Expand description
Focused monitoring and health operations exposed via AuthFramework::monitoring().
Health-checks, performance and security metrics, Prometheus export, and rate-limit inspection.
§Example
let mon = auth.monitoring();
let health = mon.health_check().await?;
let stats = mon.stats().await?;
let prom = mon.prometheus_metrics().await;Implementations§
Source§impl MonitoringOperations<'_>
impl MonitoringOperations<'_>
Sourcepub async fn health_check(&self) -> Result<HashMap<String, HealthCheckResult>>
pub async fn health_check(&self) -> Result<HashMap<String, HealthCheckResult>>
Perform a comprehensive health check across all subsystems.
Returns a map of subsystem name → health result (e.g. "storage",
"token_manager", "rate_limiter").
Sourcepub async fn performance_metrics(&self) -> HashMap<String, u64>
pub async fn performance_metrics(&self) -> HashMap<String, u64>
Get current performance metrics.
Returns a map of metric name → counter value (e.g.
"auth_requests", "auth_successes", "auth_failures").
Sourcepub async fn security_metrics(&self) -> Result<HashMap<String, u64>>
pub async fn security_metrics(&self) -> Result<HashMap<String, u64>>
Get aggregated security metrics.
Returns a map of metric name → counter value (e.g.
"brute_force_blocked", "rate_limited_requests").
Sourcepub async fn prometheus_metrics(&self) -> String
pub async fn prometheus_metrics(&self) -> String
Export metrics in Prometheus text format.
Sourcepub async fn check_ip_rate_limit(&self, ip: &str) -> Result<bool>
pub async fn check_ip_rate_limit(&self, ip: &str) -> Result<bool>
Check whether an IP address is within the configured rate limit.
Sourcepub fn manager(&self) -> Arc<MonitoringManager>
pub fn manager(&self) -> Arc<MonitoringManager>
Access the underlying monitoring manager for advanced usage.
Auto Trait Implementations§
impl<'a> Freeze for MonitoringOperations<'a>
impl<'a> !RefUnwindSafe for MonitoringOperations<'a>
impl<'a> Send for MonitoringOperations<'a>
impl<'a> Sync for MonitoringOperations<'a>
impl<'a> Unpin for MonitoringOperations<'a>
impl<'a> UnsafeUnpin for MonitoringOperations<'a>
impl<'a> !UnwindSafe for MonitoringOperations<'a>
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> 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 more