pub struct CasObservabilityConfig { /* private fields */ }Expand description
Observability settings shared by every execution of an executor.
Implementations§
Source§impl CasObservabilityConfig
impl CasObservabilityConfig
Sourcepub fn report_only() -> Self
pub fn report_only() -> Self
Creates a report-only observability configuration (lowest overhead).
Equivalent to the default.
§Returns
A CasObservabilityConfig with report-only mode and no alerts.
Sourcepub fn event_stream() -> Self
pub fn event_stream() -> Self
Creates an event-stream observability configuration.
§Returns
A CasObservabilityConfig that emits lifecycle events but no alerts.
Sourcepub fn event_stream_with_alert(thresholds: ContentionThresholds) -> Self
pub fn event_stream_with_alert(thresholds: ContentionThresholds) -> Self
Creates an event-stream configuration with contention alerts.
§Parameters
thresholds: Thresholds used to detect hot contention for alerts.
§Returns
A CasObservabilityConfig with event streaming and alert enabled.
Sourcepub fn mode(&self) -> CasObservabilityMode
pub fn mode(&self) -> CasObservabilityMode
Sourcepub fn with_report_only(self) -> Self
pub fn with_report_only(self) -> Self
Switches to report-only observability.
This disables lifecycle event streaming and clears contention thresholds.
§Returns
Updated builder-style config (consumes self).
Sourcepub fn with_event_stream(self) -> Self
pub fn with_event_stream(self) -> Self
Switches to event-stream observability without alerts.
This enables lifecycle events and clears contention thresholds.
§Returns
Updated builder-style config (consumes self).
Sourcepub fn with_event_stream_with_alert(
self,
thresholds: ContentionThresholds,
) -> Self
pub fn with_event_stream_with_alert( self, thresholds: ContentionThresholds, ) -> Self
Sourcepub fn without_contention_alerts(self) -> Self
pub fn without_contention_alerts(self) -> Self
Disables contention alerts while keeping lifecycle event streaming.
§Returns
Updated builder-style config with event streaming and no alert thresholds.
Sourcepub fn listener_panic_policy(&self) -> ListenerPanicPolicy
pub fn listener_panic_policy(&self) -> ListenerPanicPolicy
Sourcepub fn with_listener_panic_policy(self, policy: ListenerPanicPolicy) -> Self
pub fn with_listener_panic_policy(self, policy: ListenerPanicPolicy) -> Self
Sourcepub fn contention_thresholds(&self) -> Option<ContentionThresholds>
pub fn contention_thresholds(&self) -> Option<ContentionThresholds>
Returns configured contention thresholds, when alerting is enabled.
§Returns
Some(thresholds) if alert mode is active, otherwise None.
Sourcepub fn with_contention_thresholds(
self,
thresholds: ContentionThresholds,
) -> Self
pub fn with_contention_thresholds( self, thresholds: ContentionThresholds, ) -> Self
Trait Implementations§
Source§impl Clone for CasObservabilityConfig
impl Clone for CasObservabilityConfig
Source§fn clone(&self) -> CasObservabilityConfig
fn clone(&self) -> CasObservabilityConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more