cdklabs / cdk-monitoring-constructs

Easy-to-use CDK constructs for monitoring your AWS infrastructure
https://constructs.dev/packages/cdk-monitoring-constructs
Apache License 2.0
443 stars 56 forks source link

tm90 and tm99 support for Lambda latency monitors #461

Open stihahi opened 7 months ago

stihahi commented 7 months ago

Feature scope

Lambda

Describe your suggested feature

Currently latency alarms supported for LambdaFunctionMonitoring is limited to 3 metrics, P50, P90 and P99.

Our team wants to monitor Lambda latency with TM90 and TM99.

Ref: https://github.com/cdklabs/cdk-monitoring-constructs/blob/main/lib/monitoring/aws-lambda/LambdaFunctionMonitoring.ts#L56-L58

skkrail-amzn commented 1 month ago

It would be helpful if these addLatencyXAlarm props were replaced with a single addLatencyAlarms prop of a type like

Record<string, LatencyThreshold & { statistic: LatencyType }>[]

so we could specify arbitrary latency statistics.

(addLatencyXAlarm is type Record<string, LatencyThreshold>)