Skip to content
Strata is pre-1.0. APIs, protocol, and storage format may change.

strata_server/observations

Bounded, process-local operational measurements. No document IDs or payloads are retained. Windows contain the latest 128 samples, not lifetime quantiles.

Checkpoint progress within this store owner's lifetime.

pub type CheckpointProgress {
CheckpointProgress(attempts: Int, successes: Int, failures: Int, accepted_mutations: Int, checkpointed_mutations: Int, last_finished_us: option.Option(Int), last_succeeded: option.Option(Bool))
}

Lifetime count and extrema, with a bounded recent sample window.

pub type Distribution {
Distribution(count: Int, minimum: Int, maximum: Int, recent: List(Int))
}

Read-only snapshot of bounded operation data.

pub type Observations

Fixed operation classes keep the measurement key space bounded.

pub type Operation {
Snapshot
Apply
Create
Delete
Summary
Flush
Close
AdminCollection
}

Completed owner work and caller-observed round trips are counted separately. A timed-out caller does not imply that the owner rejected its operation.

pub type Statistics {
Statistics(completed: Int, succeeded: Int, failed: Int, timed_out: Int, queue_us: Distribution, service_us: Distribution, round_trip_us: Distribution)
}

Inspect checkpoint progress. Successful acceptance is not persistence.

pub fn checkpoint_progress(Observations) -> CheckpointProgress

Sizes of successful delete calls. Repeated tombstone deletes have size zero.

pub fn delete_sizes(Observations) -> Distribution

Encode bounded read-only data. Quantiles describe the latest 128 samples; counts and extrema cover the current owner's lifetime.

pub fn encode(Observations) -> json.Json

Inspect one class, including empty classes.

pub fn statistics(
Observations,
Operation
) -> Statistics