-
Notifications
You must be signed in to change notification settings - Fork 46
feat(observability): wire SNS notification action to DLQ CloudWatch alarms #629
Copy link
Copy link
Closed
Labels
approvedWhen an issue has been approved and readyWhen an issue has been approved and readyenhancementNew feature or requestNew feature or requestinfra-cdkCDK stacks/constructs, bootstrap, deploy topology, tags, IAM wiring, teardownCDK stacks/constructs, bootstrap, deploy topology, tags, IAM wiring, teardownobservabilityTracing, attribution, dashboards, metrics, alarms, telemetry redactionTracing, attribution, dashboards, metrics, alarms, telemetry redactionv1Version 1Version 1
Description
Activity
Metadata
Metadata
Assignees
Labels
approvedWhen an issue has been approved and readyWhen an issue has been approved and readyenhancementNew feature or requestNew feature or requestinfra-cdkCDK stacks/constructs, bootstrap, deploy topology, tags, IAM wiring, teardownCDK stacks/constructs, bootstrap, deploy topology, tags, IAM wiring, teardownobservabilityTracing, attribution, dashboards, metrics, alarms, telemetry redactionTracing, attribution, dashboards, metrics, alarms, telemetry redactionv1Version 1Version 1
Background
PR #208 / issue #117 adds CloudWatch DLQ-depth alarms (
ApproximateNumberOfMessagesVisible >= 1, 5-min /Maximum,treatMissingData: NOT_BREACHING) for two stream consumers:FanOutConsumer—dlqDepthAlarm(cdk/src/constructs/fanout-consumer.ts)ApprovalMetricsPublisherConsumer—dlqAlarm(cdk/src/constructs/approval-metrics-publisher-consumer.ts)Once merged, these alarms will ship without an
addAlarmAction/ SNS notification target — by design, as an intentional intermediate step (seedocs/design/CEDAR_HITL_GATES.md§11.5). Alarm state is durable and queryable in the CloudWatch console, but there is no push notification when a DLQ starts accumulating poison-pill records. Operators must poll the Alarms console or configure a subscription manually.Proposal
Provision an operational notification channel and wire it to the alarms introduced by #208:
OperationalAlertsconstruct) — ideally reusable across the stack, not per-consumer.alarm.addAlarmAction(new cloudwatch_actions.SnsAction(topic)). Both alarm properties are exposed ascloudwatch.IAlarmspecifically so a consumer can calladdAlarmActionwithout changes to the constructs.No metric or alarm restructuring is required — this is purely additive (per §11.5 "Follow-up — notification channel wiring").
Scope / considerations
GithubScreenshotIntegrationDLQ alarm (mirrors the same threshold-1 shape) should share the topic.docs/design/CEDAR_HITL_GATES.md§11.5 + the deferred-item note (~line 2111) once shipped, and regenerate the Starlight mirror (cd docs && node scripts/sync-starlight.mjs).Dependencies
main.References
docs/design/CEDAR_HITL_GATES.md