Skip to main content

Options

Struct Options 

Source
pub struct Options {
    pub include_hot_paths: bool,
    pub min_invocations_for_hot: Option<u64>,
    pub min_observation_volume: Option<u32>,
    pub low_traffic_threshold: Option<f64>,
    pub trace_count: Option<u64>,
    pub period_days: Option<u32>,
    pub deployments_seen: Option<u32>,
    pub window_seconds: Option<u64>,
    pub instances_observed: Option<u32>,
}
Expand description

Runtime knobs. All fields are optional so new options can be added without a breaking change.

Fields§

§include_hot_paths: bool

When true the sidecar computes and returns Response::hot_paths. When false, hot-path computation is skipped entirely.

§min_invocations_for_hot: Option<u64>

Minimum invocation count a function must have to qualify as a hot path. None defers to the sidecar’s spec default.

§min_observation_volume: Option<u32>

Minimum total trace volume before safe_to_delete / review_required verdicts are allowed at high/very-high confidence. Below this the sidecar caps confidence at Confidence::Medium. Spec default 5000.

§low_traffic_threshold: Option<f64>

Fraction of total trace_count below which an invoked function is classified as Verdict::LowTraffic instead of active. Spec default 0.001 (0.1%).

§trace_count: Option<u64>

Total number of traces / request-equivalents the coverage dump covers. Used as the denominator for the low-traffic ratio and gates the minimum-observation-volume cap. When None the sidecar falls back to the sum of observed invocations in the current request.

§period_days: Option<u32>

Number of days of observation the coverage dump represents. Surfaced verbatim in Summary::period_days and Evidence::observation_days.

§deployments_seen: Option<u32>

Number of distinct production deployments that contributed coverage. Surfaced verbatim in Summary::deployments_seen and Evidence::deployments_observed.

§window_seconds: Option<u64>

Total observation window in seconds. Finer-grained than Self::period_days; used to populate CaptureQuality::window_seconds. When None the sidecar falls back to period_days * 86_400. Added in protocol 0.3.0.

§instances_observed: Option<u32>

Number of distinct production instances that contributed coverage. Used to populate CaptureQuality::instances_observed. When None the sidecar falls back to Self::deployments_seen. Added in protocol 0.3.0.

Trait Implementations§

Source§

impl Clone for Options

Source§

fn clone(&self) -> Options

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 Options

Source§

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

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

impl Default for Options

Source§

fn default() -> Options

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for Options

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Options

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

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> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,