Skip to main content

Metric

Enum Metric 

#[non_exhaustive]
pub enum Metric {
Show 18 variants ClaimLatency, LeaseRenewal, LeaseRenewalLatency, ActiveTrialLeases, FailoverOutcome, OutboxLag, RemoteConnections, RemoteQueueTime, RemoteRequestLatency, RemotePageRestart, RemoteReplayEviction, SubprocessOutcome, SnapshotTrials, SnapshotStateEntries, SnapshotPendingOutbox, JournalBytesStaged, JournalCanonicalSize, JournalLockWait,
}
Expand description

What a recorded measurement measures.

Closed on purpose. A metric name is a label dimension in every exporter that will consume these events, so the set of possible names must be knowable by reading this file — an open &str metric name is how a time-series database acquires a million dead series. Adding a variant is a deliberate, reviewable edit; #[non_exhaustive] keeps that edit non-breaking for out-of-tree matchers.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

ClaimLatency

How long a worker took to claim a trial it had reserved.

§

LeaseRenewal

One lease heartbeat renewal attempt.

§

LeaseRenewalLatency

Whole microseconds spent in one lifecycle lease renewal attempt.

§

ActiveTrialLeases

Process-local number of live trial contexts holding a lease.

§

FailoverOutcome

One fail-over adjudication of a stale lease.

§

OutboxLag

How far a durable outbox record is behind its terminal commit.

§

RemoteConnections

Connections a remote endpoint is currently serving.

§

RemoteQueueTime

How long a remote request waited before it was served.

§

RemoteRequestLatency

How long a remote request took end to end.

§

RemotePageRestart

One remote immutable page-session restart after expiry or eviction.

§

RemoteReplayEviction

One completed remote lifecycle replay entry evicted by a bound.

§

SubprocessOutcome

One subprocess trial’s execution result.

§

SnapshotTrials

Number of trials materialized by one hydrated study snapshot.

§

SnapshotStateEntries

Number of side-state entries materialized by one hydrated study snapshot.

§

SnapshotPendingOutbox

Number of pending finalizations materialized by one hydrated study snapshot.

§

JournalBytesStaged

Bytes in one successfully staged complete journal image.

§

JournalCanonicalSize

Bytes in the canonical journal after one successful publication.

§

JournalLockWait

Whole microseconds from start through the terminal result of one journal append-lock acquisition call, including retries.

Implementations§

§

impl Metric

pub const fn name(self) -> &'static str

The stable wire name of this metric.

Stable in the same sense as METRICS_TARGET: exporters and dashboards key on these strings, so a change here is a breaking change to somebody’s alert, not a rename.

Trait Implementations§

§

impl Clone for Metric

§

fn clone(&self) -> Metric

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
§

impl Copy for Metric

§

impl Debug for Metric

§

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

Formats the value using the given formatter. Read more
§

impl Display for Metric

§

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

Formats the value using the given formatter. Read more
§

impl Eq for Metric

§

impl Hash for Metric

§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
§

impl Ord for Metric

§

fn cmp(&self, other: &Metric) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 (const: unstable) · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 (const: unstable) · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
§

impl PartialEq for Metric

§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
§

impl PartialOrd for Metric

§

fn partial_cmp(&self, other: &Metric) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 (const: unstable) · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 (const: unstable) · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 (const: unstable) · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 (const: unstable) · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
§

impl StructuralPartialEq for Metric

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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

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.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more