lightspeed/pipeline/slo
ETL SLO budget contracts for lag/throughput/retry/replay recovery.
Types
One ETL SLO budget profile.
pub type Budget {
Budget(
profile: String,
max_lag_ms: Int,
min_throughput_records_per_sec: Int,
max_retry_rate_percent: Int,
max_replay_recovery_ms: Int,
)
}
Constructors
-
Budget( profile: String, max_lag_ms: Int, min_throughput_records_per_sec: Int, max_retry_rate_percent: Int, max_replay_recovery_ms: Int, )
One budget check result.
pub type BudgetResult {
BudgetResult(profile: String, passed: Bool, reason: String)
}
Constructors
-
BudgetResult(profile: String, passed: Bool, reason: String)
One measured ETL observation.
pub type Observation {
Observation(
profile: String,
lag_ms: Int,
throughput_records_per_sec: Int,
retry_count: Int,
processed_records: Int,
replay_recovery_ms: Int,
)
}
Constructors
-
Observation( profile: String, lag_ms: Int, throughput_records_per_sec: Int, retry_count: Int, processed_records: Int, replay_recovery_ms: Int, )
Values
pub fn budget(
profile: String,
max_lag_ms: Int,
min_throughput_records_per_sec: Int,
max_retry_rate_percent: Int,
max_replay_recovery_ms: Int,
) -> Budget
Build one SLO budget profile.
pub fn budget_result_label(result: BudgetResult) -> String
Stable budget-result label.
pub const budget_version: Int
pub fn evaluate(
observations: List(Observation),
budgets: List(Budget),
) -> List(BudgetResult)
Evaluate one observation set against one budget list.
pub fn observation(
profile: String,
lag_ms: Int,
throughput_records_per_sec: Int,
retry_count: Int,
processed_records: Int,
replay_recovery_ms: Int,
) -> Observation
Build one ETL observation.
pub fn observation_label(observation: Observation) -> String
Stable observation label.
pub fn retry_rate_percent(observation: Observation) -> Int
Retry-rate percentage derived from retry count and processed records.
pub fn valid_budgets(budgets: List(Budget)) -> Bool
Validate a budget list and enforce unique profile names.
pub fn valid_observation(observation: Observation) -> Bool
Validate one observation.