lightspeed/pipeline/telemetry
Pipeline telemetry contracts for lag/throughput/retry/dead-letter tracking.
Types
Delta update applied to a telemetry snapshot.
pub type Delta {
Delta(
processed_records: Int,
lag_ms: Int,
retry_count: Int,
dead_letter_count: Int,
elapsed_ms: Int,
)
}
Constructors
-
Delta( processed_records: Int, lag_ms: Int, retry_count: Int, dead_letter_count: Int, elapsed_ms: Int, )
Aggregated telemetry snapshot for one pipeline runtime.
pub type Snapshot {
Snapshot(
lag_ms: Int,
throughput_records_per_sec: Int,
retry_count: Int,
dead_letter_count: Int,
)
}
Constructors
-
Snapshot( lag_ms: Int, throughput_records_per_sec: Int, retry_count: Int, dead_letter_count: Int, )
Values
pub fn apply(snapshot: Snapshot, delta: Delta) -> Snapshot
Apply one delta and return a new snapshot.
pub fn delta(
processed_records: Int,
lag_ms: Int,
retry_count: Int,
dead_letter_count: Int,
elapsed_ms: Int,
) -> Delta
Build one telemetry delta.
pub fn metrics(
snapshot: Snapshot,
pipeline_name: String,
run_id: String,
) -> List(telemetry.Metric)
Convert one snapshot to metric points.