use std::collections::HashMap;
use std::time::Duration;
#[derive(Debug, Clone)]
pub enum LogDestination {
Elasticsearch {
url: String,
index: String,
auth: Option<String>,
},
Splunk {
url: String,
token: String,
index: String,
},
CloudWatch {
region: String,
log_group: String,
log_stream: String,
},
GCPLogging {
project_id: String,
log_name: String,
},
DatadogLogs { api_key: String, site: String },
Webhook {
url: String,
headers: HashMap<String, String>,
},
}
#[derive(Debug, Clone)]
pub enum AlertChannel {
Slack {
webhook_url: String,
channel: String,
username: String,
},
Email {
smtp_host: String,
smtp_port: u16,
username: String,
password: String,
from: String,
to: Vec<String>,
},
PagerDuty {
integration_key: String,
severity: String,
},
Discord { webhook_url: String },
Teams { webhook_url: String },
Webhook {
url: String,
headers: HashMap<String, String>,
},
}
#[derive(Debug, Clone)]
pub struct AlertRule {
pub id: String,
pub name: String,
pub metric: String,
pub condition: super::types::AlertCondition,
pub threshold: f64,
pub window: Duration,
pub severity: super::types::AlertSeverity,
pub channels: Vec<String>,
pub enabled: bool,
}
#[derive(Debug, Clone)]
pub enum TraceExporter {
Jaeger {
endpoint: String,
service_name: String,
},
Zipkin {
endpoint: String,
service_name: String,
},
OpenTelemetry {
endpoint: String,
headers: HashMap<String, String>,
},
DataDogAPM {
api_key: String,
service_name: String,
},
}