Skip to main content

CasObservabilityConfig

Struct CasObservabilityConfig 

Source
pub struct CasObservabilityConfig { /* private fields */ }
Expand description

Observability settings shared by every execution of an executor.

Implementations§

Source§

impl CasObservabilityConfig

Source

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.

Source

pub fn event_stream() -> Self

Creates an event-stream observability configuration.

§Returns

A CasObservabilityConfig that emits lifecycle events but no alerts.

Source

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.

Source

pub fn mode(&self) -> CasObservabilityMode

Returns the selected observability mode.

§Returns

The current CasObservabilityMode.

Source

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).

Source

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).

Source

pub fn with_event_stream_with_alert( self, thresholds: ContentionThresholds, ) -> Self

Switches to event-stream observability with contention alerts.

§Parameters
  • thresholds: Thresholds used to detect hot contention for alerts.
§Returns

Updated builder-style config with alert mode enabled (consumes self).

Source

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.

Source

pub fn listener_panic_policy(&self) -> ListenerPanicPolicy

Returns the listener panic policy.

§Returns

Current ListenerPanicPolicy for event/alert hooks.

Source

pub fn with_listener_panic_policy(self, policy: ListenerPanicPolicy) -> Self

Sets the listener panic policy.

§Parameters
  • policy: How to handle panics from registered hooks.
§Returns

Updated builder-style config (consumes self).

Source

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.

Source

pub fn with_contention_thresholds( self, thresholds: ContentionThresholds, ) -> Self

Sets contention thresholds and enables alert-capable event streaming.

§Parameters
  • thresholds: Thresholds for classifying executions as hot contention.
§Returns

Updated builder-style config with alert mode enabled (consumes self).

Trait Implementations§

Source§

impl Clone for CasObservabilityConfig

Source§

fn clone(&self) -> CasObservabilityConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CasObservabilityConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for CasObservabilityConfig

Source§

fn default() -> Self

Returns report-only observability (the default, lowest overhead mode).

§Returns

Config with ReportOnly mode, propagate panics, and no contention thresholds.

Source§

impl PartialEq for CasObservabilityConfig

Source§

fn eq(&self, other: &CasObservabilityConfig) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for CasObservabilityConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoResult<T> for T

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.