Skip to content

Commit f6398c6

Browse files
authored
update alarm name to easily distinguish between PROD and CODE envs (#15089)
1 parent af29cd1 commit f6398c6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ab-testing/cdk/lib/__snapshots__/notificationLambda.test.ts.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ exports[`The AB testing notification lambda stack > matches the CODE snapshot 1`
387387
}
388388
],
389389
"AlarmDescription": "Something went wrong notifying test owners of upcoming AB test expiries in ab-testing-notification-lambda-CODE. Please check the logs",
390-
"AlarmName": "AB Testing Notification Failures",
390+
"AlarmName": "ab-testing-notification-lambda-CODE-alarm",
391391
"ComparisonOperator": "GreaterThanThreshold",
392392
"DatapointsToAlarm": 1,
393393
"EvaluationPeriods": 1,
@@ -941,7 +941,7 @@ exports[`The AB testing notification lambda stack > matches the PROD snapshot 1`
941941
}
942942
],
943943
"AlarmDescription": "Something went wrong notifying test owners of upcoming AB test expiries in ab-testing-notification-lambda-PROD. Please check the logs",
944-
"AlarmName": "AB Testing Notification Failures",
944+
"AlarmName": "ab-testing-notification-lambda-PROD-alarm",
945945
"ComparisonOperator": "GreaterThanThreshold",
946946
"DatapointsToAlarm": 1,
947947
"EvaluationPeriods": 1,

ab-testing/cdk/lib/notificationLambda.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export class AbTestingNotificationLambda extends GuStack {
6060
monitoringConfiguration: {
6161
snsTopicName: snsTopic.topicName,
6262
toleratedErrorPercentage: 0,
63-
alarmName: "AB Testing Notification Failures",
63+
alarmName: `${appName}-${props.stage}-alarm`,
6464
alarmDescription: `Something went wrong notifying test owners of upcoming AB test expiries in ${appName}-${props.stage}. Please check the logs`,
6565
lengthOfEvaluationPeriod: Duration.minutes(1),
6666
numberOfEvaluationPeriodsAboveThresholdBeforeAlarm: 1,

0 commit comments

Comments
 (0)