You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(alarm): add MathExpression support for minSampleCountToEvaluateDatapoint (#466)
As discussed outside of Github, this PR adds MathExpression support for minSampleCountToEvaluateDatapoint under the following circumstances:
1. If the MathExpression only has a single metric, convert to a sampleCount metric and use it for the minSampleCount
2. If there are more than one metric, rely on the new optional `sampleCountMetricId` prop to determine which existing metric in the MathExpression should be used for the sampleCount
3. Otherwise, throw an `Error`
test("addAlarm: should throw Error when minSampleCountToEvaluateDatapoint is used with multiple-metric MathExpression and sampleCountMetricId is not specified",()=>{
"minSampleCountToEvaluateDatapoint is not supported for MathExpressions"
480
+
"sampleCountMetricId must be specified when using minSampleCountToEvaluateDatapoint with a multiple-metric MathExpression"
413
481
);
414
482
});
415
483
484
+
test("addAlarm: check created alarms when minSampleCountToEvaluateDatapoint is used with multiple-metric MathExpression and sampleCountMetricId is specified",()=>{
0 commit comments