Skip to main content

Event

Enum Event 

Source
pub enum Event {
Show 20 variants Request { labels: Labels, }, Miss { labels: Labels, reason: MissReason, }, Disabled { labels: Labels, reason: DisabledReason, }, Error { labels: Labels, error: ErrorKind, in_fallback: bool, }, Invalidation { namespace: Arc<str>, key_type: Arc<str>, layer: Layer, }, Coalesced { labels: OutcomeLabels, scope: CoalescingScope, }, ShadowValidation { labels: OutcomeLabels, outcome: ShadowOutcome, }, ShadowValueAge { labels: OutcomeLabels, outcome: ShadowOutcome, seconds: f64, }, ShadowMismatchLogging { labels: OutcomeLabels, outcome: ShadowMismatchLoggingOutcome, }, FutureTimestampOffset { labels: Labels, seconds: f64, }, StaleRecovery { labels: OutcomeLabels, outcome: RecoveryOutcome, }, StaleRecoveryValueAge { labels: OutcomeLabels, outcome: RecoveryOutcome, seconds: f64, }, Compression { labels: Labels, outcome: CompressionOutcome, }, Get { labels: Labels, seconds: f64, }, Fallback { labels: Labels, seconds: f64, }, Serialization { labels: Labels, operation: SerializationOperation, seconds: f64, }, Size { labels: Labels, bytes: u64, }, StoredSize { labels: Labels, bytes: u64, }, CompressionRatio { labels: Labels, ratio: f64, }, CompressionDuration { labels: Labels, operation: CompressionOperation, seconds: f64, },
}
Expand description

One public diagnostic. Counters carry no value; timers report seconds; sizes report bytes.

Variants§

§

Request

One lookup of an enabled cache layer, hit or miss. Emitted before the result for the remote layer and after it for the request-local and process-local layers; a layer whose read failed emits Error and Disabled instead.

Fields

§labels: Labels

The layer that was looked up.

§

Miss

A layer lookup found no servable value.

Fields

§labels: Labels

The layer that missed.

§reason: MissReason

The bounded cause; request-local and process-local misses are always MissReason::ValueAbsent.

§

Disabled

A layer, or the whole call (noop), was skipped.

Fields

§labels: Labels

The skipped layer, or Layer::Noop when no layer was reached.

§reason: DisabledReason

Why it was skipped.

§

Error

A bounded failure site fired. Cache plumbing failures fail open; only source failures reach the caller.

Fields

§labels: Labels

The layer whose work failed.

§error: ErrorKind

The failure site.

§in_fallback: bool

true when the source (fallback) failed or timed out rather than cache plumbing.

§

Invalidation

One explicit invalidation attempt, emitted before the remote call and even when no remote adapter is configured.

Fields

§namespace: Arc<str>

The namespace whose entity watermark is advanced.

§key_type: Arc<str>

The entity type being invalidated.

§layer: Layer

Always Layer::Remote: watermarks live only in the remote layer.

§

Coalesced

A caller joined an execution already in flight for the same logical key instead of starting its own.

Fields

§labels: OutcomeLabels

The identity of the joined execution.

§scope: CoalescingScope

Whether the flight was registered on the request scope or the instance.

§

ShadowValidation

One terminal outcome of an admitted or explicitly dropped shadow job.

Fields

§labels: OutcomeLabels

The identity the job validated.

§outcome: ShadowOutcome

The terminal verdict.

§

ShadowValueAge

Age in seconds of the validated value at a match or confirmed mismatch, clamped at zero.

Fields

§labels: OutcomeLabels

The identity the job validated.

§outcome: ShadowOutcome

ShadowOutcome::Match or ShadowOutcome::Mismatch; no other outcome carries an age.

§seconds: f64

Observing wall clock minus the frame’s created_at_ms, never negative.

§

ShadowMismatchLogging

One confirmed-mismatch warning attempt, emitted after the warning and only while mismatch logging is on.

Fields

§labels: OutcomeLabels

The identity the job validated.

§outcome: ShadowMismatchLoggingOutcome

Whether the warning was built and delivered, or why not.

§

FutureTimestampOffset

Positive offset in seconds of a frame dated after the observing clock.

Fields

§labels: Labels

The layer whose read decoded the frame.

§seconds: f64

How far the frame’s created_at_ms lies ahead of the observing wall clock.

§

StaleRecovery

One classifier-authorized stale-on-error recovery check after a source failure.

Fields

§labels: OutcomeLabels

The identity being recovered.

§outcome: RecoveryOutcome

Whether a retained frame was served.

§

StaleRecoveryValueAge

Age of the retained frame at the moment recovery served it; emitted only alongside RecoveryOutcome::Served.

Fields

§labels: OutcomeLabels

The identity being recovered.

§seconds: f64

Observing wall clock minus the frame’s created_at_ms, clamped at zero.

§

Compression

One envelope decision: on every write while compression is enabled, and on reads whose payload carried a zstd marker.

Fields

§labels: Labels

The layer performing the write or read.

§outcome: CompressionOutcome

Write and read outcomes are disjoint sets; see CompressionOutcome.

§

Get

Lookup latency of one layer, hit or miss; a remote read’s value includes any wait up to its deadline.

Fields

§labels: Labels

The layer looked up.

§seconds: f64

Elapsed time of the lookup.

§

Fallback

Time until the source settled or its deadline elapsed, once per source invocation that served the caller (shadow re-validation runs the source without it).

Fields

§labels: Labels

Layer::RequestLocal when the request memo was consulted, Layer::Remote when the remote layer was consulted, otherwise Layer::Local (even with the local layer disabled), and Layer::Noop only when the call bypassed caching.

§seconds: f64

Elapsed time from invoking the source until it settled or its deadline fired.

§

Serialization

Codec latency of one encode or decode, emitted whether or not the codec succeeded.

Fields

§labels: Labels

The layer the payload was written to or read from.

§operation: SerializationOperation

Encode (dump) or decode (load).

§seconds: f64

Elapsed time inside the codec.

§

Size

Serializer output size of one remote write, before compression and escaping.

Fields

§labels: Labels

The layer being written.

§bytes: u64

Length of the codec output.

§

StoredSize

Prepared payload size of one remote write, after compression and escaping, before dispatch.

Fields

§labels: Labels

The layer being written.

§bytes: u64

Length of the payload handed to the adapter, excluding the ten-byte frame header.

§

CompressionRatio

Size ratio of one write that chose the compressed form.

Fields

§labels: Labels

The layer being written.

§ratio: f64

Marked compressed bytes divided by serializer output bytes.

§

CompressionDuration

zstd latency: on writes when compression ran (compressed or not smaller), on reads when a marked frame was decoded or rejected.

Fields

§labels: Labels

The layer performing the write or read.

§operation: CompressionOperation

Compress (write) or decompress (read).

§seconds: f64

Elapsed time of the envelope step.

Trait Implementations§

Source§

impl Clone for Event

Source§

fn clone(&self) -> Event

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
Source§

impl Debug for Event

Source§

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

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

impl PartialEq for Event

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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 Event

Auto Trait Implementations§

§

impl Freeze for Event

§

impl RefUnwindSafe for Event

§

impl Send for Event

§

impl Sync for Event

§

impl Unpin for Event

§

impl UnsafeUnpin for Event

§

impl UnwindSafe for Event

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.