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.
Miss
A layer lookup found no servable value.
Fields
reason: MissReasonThe bounded cause; request-local and process-local misses are
always MissReason::ValueAbsent.
Disabled
A layer, or the whole call (noop), was skipped.
Fields
labels: LabelsThe skipped layer, or Layer::Noop when no layer was reached.
reason: DisabledReasonWhy it was skipped.
Error
A bounded failure site fired. Cache plumbing failures fail open; only source failures reach the caller.
Fields
Invalidation
One explicit invalidation attempt, emitted before the remote call and even when no remote adapter is configured.
Fields
layer: LayerAlways 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: OutcomeLabelsThe identity of the joined execution.
scope: CoalescingScopeWhether 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: OutcomeLabelsThe identity the job validated.
outcome: ShadowOutcomeThe terminal verdict.
ShadowValueAge
Age in seconds of the validated value at a match or confirmed mismatch, clamped at zero.
Fields
labels: OutcomeLabelsThe identity the job validated.
outcome: ShadowOutcomeShadowOutcome::Match or ShadowOutcome::Mismatch; no other
outcome carries an age.
ShadowMismatchLogging
One confirmed-mismatch warning attempt, emitted after the warning and only while mismatch logging is on.
Fields
labels: OutcomeLabelsThe identity the job validated.
outcome: ShadowMismatchLoggingOutcomeWhether the warning was built and delivered, or why not.
FutureTimestampOffset
Positive offset in seconds of a frame dated after the observing clock.
Fields
StaleRecovery
One classifier-authorized stale-on-error recovery check after a source failure.
Fields
labels: OutcomeLabelsThe identity being recovered.
outcome: RecoveryOutcomeWhether a retained frame was served.
StaleRecoveryValueAge
Age of the retained frame at the moment recovery served it; emitted
only alongside RecoveryOutcome::Served.
Fields
labels: OutcomeLabelsThe identity being recovered.
outcome: RecoveryOutcomeAlways RecoveryOutcome::Served.
Compression
One envelope decision: on every write while compression is enabled, and on reads whose payload carried a zstd marker.
Fields
outcome: CompressionOutcomeWrite 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.
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: LabelsLayer::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.
Serialization
Codec latency of one encode or decode, emitted whether or not the codec succeeded.
Fields
operation: SerializationOperationEncode (dump) or decode (load).
Size
Serializer output size of one remote write, before compression and escaping.
StoredSize
Prepared payload size of one remote write, after compression and escaping, before dispatch.
Fields
CompressionRatio
Size ratio of one write that chose the compressed form.
Fields
CompressionDuration
zstd latency: on writes when compression ran (compressed or not smaller), on reads when a marked frame was decoded or rejected.