pub struct ChaosMetrics {Show 13 fields
pub scenarios_total: CounterVec,
pub faults_injected_total: CounterVec,
pub latency_injected: HistogramVec,
pub rate_limit_violations_total: CounterVec,
pub circuit_breaker_state: GaugeVec,
pub bulkhead_concurrent: GaugeVec,
pub orchestration_step_duration: HistogramVec,
pub orchestration_executions_total: CounterVec,
pub active_orchestrations: GaugeVec,
pub assertion_results_total: CounterVec,
pub hook_executions_total: CounterVec,
pub recommendations_total: GaugeVec,
pub chaos_impact_score: GaugeVec,
}Expand description
Chaos orchestration metrics
Fields§
§scenarios_total: CounterVecNumber of scenarios executed
faults_injected_total: CounterVecNumber of faults injected
latency_injected: HistogramVecLatency injected (histogram)
rate_limit_violations_total: CounterVecRate limit violations
circuit_breaker_state: GaugeVecCircuit breaker state
bulkhead_concurrent: GaugeVecBulkhead concurrent requests
orchestration_step_duration: HistogramVecOrchestration step duration
orchestration_executions_total: CounterVecOrchestration execution status
active_orchestrations: GaugeVecActive orchestrations
assertion_results_total: CounterVecAssertion results
hook_executions_total: CounterVecHook executions
recommendations_total: GaugeVecRecommendation count
chaos_impact_score: GaugeVecSystem impact score
Implementations§
Source§impl ChaosMetrics
impl ChaosMetrics
Sourcepub fn record_scenario(&self, scenario_type: &str, success: bool)
pub fn record_scenario(&self, scenario_type: &str, success: bool)
Record scenario execution
Sourcepub fn record_fault(&self, fault_type: &str, endpoint: &str)
pub fn record_fault(&self, fault_type: &str, endpoint: &str)
Record fault injection
Sourcepub fn record_latency(&self, endpoint: &str, latency_ms: f64)
pub fn record_latency(&self, endpoint: &str, latency_ms: f64)
Record latency injection
Sourcepub fn record_rate_limit_violation(&self, endpoint: &str)
pub fn record_rate_limit_violation(&self, endpoint: &str)
Record rate limit violation
Sourcepub fn update_circuit_breaker_state(&self, circuit_name: &str, state: f64)
pub fn update_circuit_breaker_state(&self, circuit_name: &str, state: f64)
Update circuit breaker state
Sourcepub fn update_bulkhead_concurrent(&self, bulkhead_name: &str, count: f64)
pub fn update_bulkhead_concurrent(&self, bulkhead_name: &str, count: f64)
Update bulkhead concurrent requests
Sourcepub fn record_step_duration(
&self,
orchestration: &str,
step: &str,
duration_secs: f64,
)
pub fn record_step_duration( &self, orchestration: &str, step: &str, duration_secs: f64, )
Record orchestration step duration
Sourcepub fn record_orchestration_execution(&self, orchestration: &str, success: bool)
pub fn record_orchestration_execution(&self, orchestration: &str, success: bool)
Record orchestration execution
Sourcepub fn update_active_orchestrations(&self, orchestration: &str, active: bool)
pub fn update_active_orchestrations(&self, orchestration: &str, active: bool)
Update active orchestrations
Sourcepub fn record_assertion(&self, orchestration: &str, passed: bool)
pub fn record_assertion(&self, orchestration: &str, passed: bool)
Record assertion result
Sourcepub fn record_hook(&self, hook_type: &str, success: bool)
pub fn record_hook(&self, hook_type: &str, success: bool)
Record hook execution
Sourcepub fn update_recommendations(&self, category: &str, severity: &str, count: f64)
pub fn update_recommendations(&self, category: &str, severity: &str, count: f64)
Update recommendations count
Sourcepub fn update_impact_score(&self, time_window: &str, score: f64)
pub fn update_impact_score(&self, time_window: &str, score: f64)
Update chaos impact score
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ChaosMetrics
impl !RefUnwindSafe for ChaosMetrics
impl Send for ChaosMetrics
impl Sync for ChaosMetrics
impl Unpin for ChaosMetrics
impl !UnwindSafe for ChaosMetrics
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request