Expand description
Data-freshness & volume SLA monitoring (#202).
The top-level sla: block declares freshness/volume expectations for a
pipeline; the executor evaluates them after every root invocation
(faucet run, schedule, serve, and replicate all flow through
crate::executor::run_expanded, so every runtime gets the same
evaluation). Violations emit
faucet_pipeline_sla_violations_total{pipeline,row,kind} and a structured
warning — they never fail or abort the run. faucet doctor additionally
reports staleness / baseline health read-only.
Module layout (mirrors schedule/ / replication/):
Re-exports§
pub use eval::SlaViolation;pub use spec::AnomalyMethod;pub use spec::SlaSpec;pub use spec::VolumeAnomalySpec;pub use state::SLA_STATE_SUFFIX;pub use state::SlaState;pub use state::sla_state_key;
Modules§
- eval
- Pure SLA evaluation: staleness, static volume floor, and learned-baseline
volume anomaly detection (z-score / Tukey IQR fences). No I/O — the
orchestration in
sla::evaluate_post_runowns state loading/persisting. - metrics
- Prometheus surface for SLA monitoring (#202).
- spec
- Config types for the top-level
sla:block (#202). - state
- Persisted SLA history: last-success timestamp + rolling volume baseline.
Enums§
- RunOutcome
- How the run being evaluated ended.
Functions§
- doctor_
probes - Read-only SLA probes for
faucet doctor(and serve’sdoctor_first): staleness of the last recorded success and volume-baseline warm-up state.min_rows_per_runhas nothing to probe without a run, so it is not represented here. - evaluate_
post_ run - Post-run SLA evaluation for one root invocation: load prior history, evaluate, persist the updated baseline on success, and emit metrics/warnings for every violation. Returns the violations found.