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 55 forks source link

add addMaxIncomingLogsAlarm to monitorLog #495

Closed joeydebreuk closed 3 months ago

joeydebreuk commented 4 months ago

Feature scope

cloudwatch

Describe your suggested feature

in aws lambda there are cases where its preferred to console.error, but continue the execution, instead of raising an exception.

For this case I'd like to monitor logs, with a pattern and something like addMaxIncomingLogsAlarm

            .monitorLog({
                logGroupName: ...,
                pattern: "ERROR",
                alarmFriendlyName: "Handled exception occurred",
                addMaxIncomingLogsAlarm: {...},
            })