Skip to content

Commit

Permalink
Alert on the new metric at a higher threshold (>= 10 in an hour)
Browse files Browse the repository at this point in the history
  • Loading branch information
tjmw committed Jan 30, 2025
1 parent 4e053a4 commit 2853ecc
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 0 deletions.
59 changes: 59 additions & 0 deletions cdk/lib/__snapshots__/frontend.test.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions cdk/lib/frontend.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,32 @@ export class Frontend extends GuStack {
snsTopicName: `alarms-handler-topic-${this.stage}`,
});

new GuAlarm(this, "ServerSideHighThresholdCreateFailureAlarm", {
app,
alarmName: alarmName(
"support-frontend create recurring product call failed multiple times for a known reason"
),
alarmDescription: alarmDescription(
"Someone pressed buy on a recurring product but received an error. This has happened multiple times for a known reason."
),
actionsEnabled: shouldCreateAlarms,
threshold: 10,
evaluationPeriods: 60,
comparisonOperator:
ComparisonOperator.GREATER_THAN_OR_EQUAL_TO_THRESHOLD,
metric: new Metric({
metricName: "ServerSideHighThresholdCreateFailure",
namespace: "support-frontend",
dimensionsMap: {
Stage: "PROD",
},
statistic: "Sum",
period: Duration.minutes(1),
}),
treatMissingData: TreatMissingData.NOT_BREACHING,
snsTopicName: `alarms-handler-topic-${this.stage}`,
});

new GuAlarm(this, "GetDeliveryAgentsFailure", {
app,
alarmName: alarmName("support-frontend GetDeliveryAgentsFailure"),
Expand Down

0 comments on commit 2853ecc

Please sign in to comment.