quantrs2_device/telemetry/
telemetryconfig_traits.rs1#[cfg(not(feature = "scirs2"))]
12use fallback_scirs2::*;
13use quantrs2_circuit::prelude::*;
14use std::collections::{BTreeMap, HashMap, VecDeque};
15
16use super::types::{
17 AlertConfig, AnalyticsConfig, ExportConfig, MetricConfig, MonitoringConfig, RetentionConfig,
18 TelemetryConfig,
19};
20
21impl Default for TelemetryConfig {
22 fn default() -> Self {
23 Self {
24 enabled: true,
25 collection_interval: 30,
26 enable_realtime_monitoring: true,
27 enable_analytics: true,
28 enable_alerting: true,
29 retention_config: RetentionConfig {
30 realtime_retention_hours: 24,
31 historical_retention_days: 30,
32 aggregated_retention_months: 12,
33 enable_compression: true,
34 archive_threshold_gb: 10.0,
35 },
36 metric_config: MetricConfig {
37 enable_performance_metrics: true,
38 enable_resource_metrics: true,
39 enable_error_metrics: true,
40 enable_cost_metrics: true,
41 enable_custom_metrics: true,
42 sampling_rate: 1.0,
43 batch_size: 100,
44 },
45 monitoring_config: MonitoringConfig {
46 dashboard_refresh_rate: 5,
47 health_check_interval: 60,
48 anomaly_sensitivity: 0.8,
49 enable_trend_analysis: true,
50 monitoring_targets: Vec::new(),
51 },
52 analytics_config: AnalyticsConfig {
53 enable_statistical_analysis: true,
54 enable_predictive_analytics: true,
55 enable_correlation_analysis: true,
56 processing_interval_minutes: 15,
57 confidence_level: 0.95,
58 prediction_horizon_hours: 24,
59 },
60 alert_config: AlertConfig {
61 enable_email_alerts: true,
62 enable_sms_alerts: false,
63 enable_webhook_alerts: true,
64 enable_slack_alerts: false,
65 thresholds: HashMap::new(),
66 escalation_rules: Vec::new(),
67 suppression_rules: Vec::new(),
68 },
69 export_config: ExportConfig {
70 enable_prometheus: true,
71 enable_influxdb: false,
72 enable_grafana: false,
73 enable_custom_exports: false,
74 export_endpoints: HashMap::new(),
75 },
76 }
77 }
78}