cdk-monitoring-constructs icon indicating copy to clipboard operation
cdk-monitoring-constructs copied to clipboard

Being able to get/create composite alarms using tags

Open Laxenade opened this issue 6 months ago • 1 comments

Feature scope

Alarms

Describe your suggested feature

Currently, in https://github.com/cdklabs/cdk-monitoring-constructs/blob/main/lib/facade/MonitoringFacade.ts#L358-L374, the code calls createdAlarmsWithTag(), which intentionally excludes composite alarms. That behavior makes sense, and I understand there are valid cases where we might not want to include composite alarms.

That said, I think it would be valuable to give users more flexibility and choices. Supporting nested composite alarms (i.e., a composite alarm that references other composite alarms)—is an important use case for advanced alarming. While there are workarounds, none are as clean or intuitive as having native support in the facade.

I also noticed that issues https://github.com/cdklabs/cdk-monitoring-constructs/issues/237 and https://github.com/cdklabs/cdk-monitoring-constructs/issues/618 are requesting similar functionality. So I wanted to ask, is there any blocker that prevents us from, say, introducing an optional flag to include composite alarms in createdAlarmsWithTag()—with the understanding that the user assumes full responsibility for avoiding infinite recursion?

Laxenade avatar Apr 30 '25 09:04 Laxenade