警报仅在状态发生变化时触发
因此,如果警报针对x > 10,则警报将在 x 变为 10 时触发,直到 x <= 10 才会解决。
注意:缺少数据并不构成状态变化。
telemetry.TrackMetric(x, 11); // causes alert to fire
// 12 hours pass, alert is "active" the entire time
something.wait(12hours);
telemetry.TrackMetric(x, 1); // causes alert to be resolved.
并且一旦警报处于活动状态,会导致其处于活动状态的更多值不会导致更多警报。
telemetry.TrackMetric(x, 11); // causes alert to fire
telemetry.TrackMetric(x, 12); // will NOT cause alert, x is already > 10
telemetry.TrackMetric(x, 13); // will NOT cause alert, x is already > 10
telemetry.TrackMetric(x, 14); // will NOT cause alert, x is already > 10
telemetry.TrackMetric(x, 15); // will NOT cause alert, x is already > 10
telemetry.TrackMetric(x, 16); // will NOT cause alert, x is already > 10