pub struct InfrastructureMetricsRecorder { /* private fields */ }Implementations§
Source§impl InfrastructureMetricsRecorder
impl InfrastructureMetricsRecorder
Sourcepub fn new(provider: MetricsProvider) -> MetricResult<Self>
pub fn new(provider: MetricsProvider) -> MetricResult<Self>
§Errors
Returns an error if the shared schema cannot be registered atomically on this provider.
pub fn provider(&self) -> &MetricsProvider
Trait Implementations§
Source§impl Clone for InfrastructureMetricsRecorder
impl Clone for InfrastructureMetricsRecorder
Source§fn clone(&self) -> InfrastructureMetricsRecorder
fn clone(&self) -> InfrastructureMetricsRecorder
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 DbMetricsRecorder for InfrastructureMetricsRecorder
impl DbMetricsRecorder for InfrastructureMetricsRecorder
Source§fn record_db_query(&self, metric: &DbQueryMetric)
fn record_db_query(&self, metric: &DbQueryMetric)
Records one database query metric.
Source§impl HealthMetricsRecorder for InfrastructureMetricsRecorder
Available on crate feature runtime-health only.
impl HealthMetricsRecorder for InfrastructureMetricsRecorder
Available on crate feature
runtime-health only.Source§fn record_health_report(
&self,
scope: &'static str,
status: HealthStatus,
duration_seconds: f64,
)
fn record_health_report( &self, scope: &'static str, status: HealthStatus, duration_seconds: f64, )
Records the aggregate health result for
scope.Source§fn record_health_component(
&self,
scope: &'static str,
component: &HealthComponentReport,
duration_seconds: f64,
)
fn record_health_component( &self, scope: &'static str, component: &HealthComponentReport, duration_seconds: f64, )
Records one component result for
scope.Source§impl MetricsRecorder for InfrastructureMetricsRecorder
impl MetricsRecorder for InfrastructureMetricsRecorder
Source§fn provider(&self) -> Option<MetricsProvider>
fn provider(&self) -> Option<MetricsProvider>
Instance resources for endpoint injection and lifecycle management.
fn record_health(&self, scope: &'static str, report: &SystemHealthReport)
Source§fn record_http_request(
&self,
method: &str,
route: &str,
status: u16,
duration_seconds: f64,
)
fn record_http_request( &self, method: &str, route: &str, status: u16, duration_seconds: f64, )
Records an HTTP request. Read more
Source§fn record_auth_event(
&self,
action: &'static str,
status: &'static str,
reason: &'static str,
)
fn record_auth_event( &self, action: &'static str, status: &'static str, reason: &'static str, )
Records an authentication event.
Source§fn record_application_event(
&self,
category: &'static str,
event: &'static str,
status: &'static str,
)
fn record_application_event( &self, category: &'static str, event: &'static str, status: &'static str, )
Records a generic application event.
Source§fn record_config_reload(
&self,
source: &'static str,
decision: &'static str,
status: &'static str,
changed_keys: u64,
duration_seconds: f64,
)
fn record_config_reload( &self, source: &'static str, decision: &'static str, status: &'static str, changed_keys: u64, duration_seconds: f64, )
Records a runtime configuration reload attempt.
Source§fn record_config_mutation(
&self,
source: &'static str,
operation: &'static str,
status: &'static str,
changed_keys: u64,
)
fn record_config_mutation( &self, source: &'static str, operation: &'static str, status: &'static str, changed_keys: u64, )
Records a runtime configuration mutation.
Source§fn record_background_task_transition(
&self,
kind: &'static str,
status: &'static str,
)
fn record_background_task_transition( &self, kind: &'static str, status: &'static str, )
Records a background task state transition.
Source§fn set_background_tasks_pending(&self, pending: u64)
fn set_background_tasks_pending(&self, pending: u64)
Sets the number of pending background tasks.
Auto Trait Implementations§
impl Freeze for InfrastructureMetricsRecorder
impl !RefUnwindSafe for InfrastructureMetricsRecorder
impl Send for InfrastructureMetricsRecorder
impl Sync for InfrastructureMetricsRecorder
impl Unpin for InfrastructureMetricsRecorder
impl UnsafeUnpin for InfrastructureMetricsRecorder
impl !UnwindSafe for InfrastructureMetricsRecorder
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