@@ -33,11 +33,25 @@ export interface WatchLambdaFunctionOptions {
33
33
readonly durationThresholdPercent ?: number ;
34
34
35
35
/**
36
- * Number of periods to evaluate for the alarms.
36
+ * Number of periods to evaluate for the errors alarms.
37
37
*
38
38
* @default 3
39
39
*/
40
- readonly evaluationPeriods ?: number ;
40
+ readonly errorsEvaluationPeriods ?: number ;
41
+
42
+ /**
43
+ * Number of periods to evaluate for the throttles alarms.
44
+ *
45
+ * @default 3
46
+ */
47
+ readonly throttlesEvaluationPeriods ?: number ;
48
+
49
+ /**
50
+ * Number of periods to evaluate for the duration alarms.
51
+ *
52
+ * @default 3
53
+ */
54
+ readonly durationEvaluationPeriods ?: number ;
41
55
}
42
56
43
57
export interface WatchLambdaFunctionProps extends WatchLambdaFunctionOptions {
@@ -70,16 +84,16 @@ export class WatchLambdaFunction extends Construct {
70
84
71
85
const { errorsMetric, errorsAlarm } = this . createErrorsMonitor (
72
86
props . errorsPerMinuteThreshold ,
73
- props . evaluationPeriods ,
87
+ props . errorsEvaluationPeriods ,
74
88
) ;
75
89
const { throttlesMetric, throttlesAlarm } = this . createThrottlesMonitor (
76
90
props . throttlesPerMinuteThreshold ,
77
- props . evaluationPeriods ,
91
+ props . throttlesEvaluationPeriods ,
78
92
) ;
79
93
const { durationMetric, durationAlarm } = this . createDurationMonitor (
80
94
timeoutSec ,
81
95
props . durationThresholdPercent ,
82
- props . evaluationPeriods ,
96
+ props . durationEvaluationPeriods ,
83
97
) ;
84
98
const invocationsMetric = this . metrics . metricInvocations (
85
99
this . fn . functionName ,
0 commit comments