pub struct ObservabilityService { /* private fields */ }Expand description
Enhanced observability service for comprehensive monitoring
This service provides a comprehensive observability solution for the adaptive pipeline system, combining real-time monitoring, alerting, performance tracking, and health assessment capabilities.
§Key Features
- Real-Time Monitoring: Continuous monitoring of system performance and health
- Intelligent Alerting: Threshold-based alerting with configurable conditions
- Performance Analysis: Detailed performance tracking and trend analysis
- Health Assessment: Multi-factor system health scoring
- Integration: Seamless integration with metrics and configuration services
§Architecture
The service is built around several core components:
- Performance Tracker: Real-time performance metric tracking
- Alert Manager: Configurable alerting system
- Health Monitor: System health assessment and scoring
- Configuration Integration: Dynamic configuration management
§Examples
Implementations§
Source§impl ObservabilityService
impl ObservabilityService
Sourcepub fn new(metrics_service: Arc<MetricsService>) -> Self
pub fn new(metrics_service: Arc<MetricsService>) -> Self
Create a new observability service
Sourcepub async fn new_with_config(metrics_service: Arc<MetricsService>) -> Self
pub async fn new_with_config(metrics_service: Arc<MetricsService>) -> Self
Create a new observability service with configuration
Sourcepub async fn start_operation(&self, operation_name: &str) -> OperationTracker
pub async fn start_operation(&self, operation_name: &str) -> OperationTracker
Start operation tracking
Sourcepub async fn complete_operation(
&self,
operation_name: &str,
duration: Duration,
success: bool,
throughput_mbps: f64,
)
pub async fn complete_operation( &self, operation_name: &str, duration: Duration, success: bool, throughput_mbps: f64, )
Complete operation tracking
Sourcepub async fn get_system_health(&self) -> SystemHealth
pub async fn get_system_health(&self) -> SystemHealth
Get current system health
Sourcepub async fn record_processing_metrics(&self, metrics: &ProcessingMetrics)
pub async fn record_processing_metrics(&self, metrics: &ProcessingMetrics)
Record processing metrics
Sourcepub async fn get_performance_summary(&self) -> String
pub async fn get_performance_summary(&self) -> String
Get performance summary for display
Trait Implementations§
Source§impl Clone for ObservabilityService
impl Clone for ObservabilityService
Source§fn clone(&self) -> ObservabilityService
fn clone(&self) -> ObservabilityService
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 moreAuto Trait Implementations§
impl Freeze for ObservabilityService
impl !RefUnwindSafe for ObservabilityService
impl Send for ObservabilityService
impl Sync for ObservabilityService
impl Unpin for ObservabilityService
impl !UnwindSafe for ObservabilityService
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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