@@ -37,7 +37,6 @@ import {
3737 ThirdWidth ,
3838 TimeAxisMillisFromZero ,
3939 TpsAlarmFactory ,
40- TwoThirdsWidth ,
4140 UsageAlarmFactory ,
4241 UsageThreshold ,
4342 UsageType ,
@@ -129,6 +128,7 @@ export class LambdaFunctionMonitoring extends Monitoring {
129128 protected readonly tpsAnnotations : HorizontalAnnotation [ ] ;
130129 protected readonly cpuTotalTimeAnnotations : HorizontalAnnotation [ ] ;
131130 protected readonly memoryUsageAnnotations : HorizontalAnnotation [ ] ;
131+ protected readonly maxIteratorAgeAnnotations : HorizontalAnnotation [ ] ;
132132
133133 protected readonly tpsMetric : MetricWithAlarmSupport ;
134134 protected readonly p50LatencyMetric : MetricWithAlarmSupport ;
@@ -186,6 +186,7 @@ export class LambdaFunctionMonitoring extends Monitoring {
186186 this . tpsAnnotations = [ ] ;
187187 this . cpuTotalTimeAnnotations = [ ] ;
188188 this . memoryUsageAnnotations = [ ] ;
189+ this . maxIteratorAgeAnnotations = [ ] ;
189190
190191 this . metricFactory = new LambdaFunctionMetricFactory (
191192 scope . createMetricFactory ( ) ,
@@ -456,6 +457,7 @@ export class LambdaFunctionMonitoring extends Monitoring {
456457 alarmProps ,
457458 disambiguator
458459 ) ;
460+ this . maxIteratorAgeAnnotations . push ( createdAlarm . annotation ) ;
459461 this . addAlarm ( createdAlarm ) ;
460462 }
461463
@@ -481,7 +483,8 @@ export class LambdaFunctionMonitoring extends Monitoring {
481483 this . createRateWidget ( QuarterWidth , DefaultGraphWidgetHeight )
482484 ) ,
483485 new Row (
484- this . createInvocationWidget ( TwoThirdsWidth , DefaultGraphWidgetHeight ) ,
486+ this . createInvocationWidget ( ThirdWidth , DefaultGraphWidgetHeight ) ,
487+ this . createIteratorAgeWidget ( ThirdWidth , DefaultGraphWidgetHeight ) ,
485488 this . createErrorCountWidget ( ThirdWidth , DefaultGraphWidgetHeight )
486489 ) ,
487490 ] ;
@@ -594,6 +597,17 @@ export class LambdaFunctionMonitoring extends Monitoring {
594597 } ) ;
595598 }
596599
600+ protected createIteratorAgeWidget ( width : number , height : number ) {
601+ return new GraphWidget ( {
602+ width,
603+ height,
604+ title : "Iterator" ,
605+ left : [ this . maxIteratorAgeMetric ] ,
606+ leftYAxis : TimeAxisMillisFromZero ,
607+ leftAnnotations : this . maxIteratorAgeAnnotations ,
608+ } ) ;
609+ }
610+
597611 protected createLambdaInsightsCpuWidget ( width : number , height : number ) {
598612 return new GraphWidget ( {
599613 width,
0 commit comments