Module observability

Module observability 

Source
Expand description

Observability module for comprehensive monitoring, tracing, and metrics collection.

This module provides:

  • OpenTelemetry integration with distributed tracing
  • Prometheus metrics export
  • Structured logging with correlation IDs
  • Performance monitoring with minimal overhead (<2%)
  • Health monitoring and check endpoints
  • Performance profiling with flame graphs and regression detection

Re-exports§

pub use telemetry::ObservabilityConfig;
pub use telemetry::TelemetryProvider;
pub use telemetry::TracingService;
pub use telemetry::EventTrace;
pub use telemetry::TraceContext;
pub use telemetry::SpanBuilder;
pub use metrics::MetricsCollector;
pub use metrics::PrometheusExporter;
pub use metrics::EventMetrics;
pub use metrics::PerformanceMetrics;
pub use metrics::OperationTimer;
pub use metrics::MetricLabels;
pub use logging::StructuredLogger;
pub use logging::LogLevel;
pub use logging::LogContext;
pub use logging::CorrelationLogger;
pub use logging::ObservabilityLogger;
pub use logging::LogEntry;
pub use logging::LogAggregator;
pub use correlation::CorrelationId;
pub use correlation::CorrelationContext;
pub use correlation::CorrelationTracker;
pub use correlation::RequestContext;
pub use correlation::TraceCorrelation;
pub use correlation::generate_correlation_id;
pub use health::HealthStatus;
pub use health::HealthCheckResult;
pub use health::SystemMetrics;
pub use health::SystemHealthThresholds;
pub use health::HealthReport;
pub use health::ServiceInfo;
pub use health::HealthConfig;
pub use health::HealthChecker;
pub use health::DatabaseHealthChecker;
pub use health::EventStoreHealthChecker;
pub use health::StreamingHealthChecker;
pub use health::SecurityHealthChecker;
pub use health::TenancyHealthChecker;
pub use health::HealthMonitorService;
pub use profiling::PerformanceProfiler;
pub use profiling::PerformanceProfilerBuilder;
pub use profiling::ProfilingConfig;
pub use profiling::ProfileType;
pub use profiling::ProfileEntry;
pub use profiling::MemoryInfo;
pub use profiling::IoInfo;
pub use profiling::CallGraphNode;
pub use profiling::RegressionDetection;
pub use profiling::PerformanceSnapshot;
pub use profiling::RegressionSeverity;
pub use profiling::FlameGraph;
pub use profiling::FlameGraphNode;
pub use profiling::BottleneckAnalysis;
pub use profiling::Bottleneck;
pub use profiling::BottleneckType;
pub use profiling::OptimizationSuggestion;

Modules§

correlation
Correlation ID management for distributed tracing and request tracking
health
Health monitoring and check system for production deployments
logging
Structured logging module with correlation ID support
metrics
Metrics collection and Prometheus export module
profiling
Performance profiling module for comprehensive performance analysis.
telemetry
OpenTelemetry integration module for distributed tracing

Structs§

ObservabilityService
Main observability service that coordinates all monitoring aspects
ObservabilityServiceBuilder
Builder for creating observability service instances