Purpose
防止采集缺失被错误解释为真实的零。
type MetricValue =
| { state: "observed"; value: number }
| { state: "missing"; reason: string }
| { state: "partial"; value?: number; reason: string };What it solves
让运营人员区分已确认的 0、当前缺失与部分可用数据,避免错误复盘。
从业务语义重新整理,不包含公司源码或真实接口。