Rust

sample

Module

Canonical samples: immutable, identified observations of one stream, read back with evidence of their completeness (conflicts, gaps, discontinuities, truncation).

Contents

use utopia_usage::Sample;
Rust
pub struct Sample

One observation of a stream: who measured it (environment, region, project, database, member, generation), its sequence number, the metric, the interval it covers and the value.

use utopia_usage::SampleGap;
Rust
pub struct SampleGap

A run of missing sequence numbers, first..=last.

use utopia_usage::SampleRange;
Rust
pub struct SampleRange

One exact range of a stream: the identity fields, a sequence range and the interval it must cover.

use utopia_usage::SampleResult;
Rust
pub struct SampleResult

The samples of a range read under a watermark, with the evidence that decides whether they are complete.

use utopia_usage::SampleWatermark;
Rust
pub struct SampleWatermark

The exact membership one snapshot of a range captured: entries <ingestId>:<id>:<payloadHash>, and whether more existed.