Skip to content

Commit

Permalink
add a Stage dimension to the metric filter designed to catch the `e…
Browse files Browse the repository at this point in the history
…mail-lambda` race condition
  • Loading branch information
twrichards committed Nov 29, 2024
1 parent 0ecc24a commit 214e1b8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cdk/lib/__snapshots__/stack.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1632,6 +1632,12 @@ Object {
},
"MetricTransformations": Array [
Object {
"Dimensions": Array [
Object {
"Key": "Stage",
"Value": "TEST",
},
],
"MetricName": "EmailLambdaRaceCondition",
"MetricNamespace": "Pinboard",
"MetricValue": "1",
Expand Down
3 changes: 3 additions & 0 deletions cdk/lib/stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,9 @@ export class PinBoardStack extends GuStack {
),
metricName: "EmailLambdaRaceCondition",
metricNamespace: "Pinboard",
dimensions: {
Stage: this.stage,
},
filterPattern: {
logPatternString: EMAIL_LAMBDA_RACE_CONDITION_LOG_LINE_SNIPPET,
},
Expand Down

0 comments on commit 214e1b8

Please sign in to comment.