Skip to content

Commit c1a9bc2

Browse files
remove oddOrEven from dimensions
1 parent 2f1513d commit c1a9bc2

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lambdas/upsert-letter/src/handler/upsert-handler.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -173,14 +173,12 @@ export default function createUpsertLetterHandler(deps: Deps): SQSHandler {
173173
const type = getType(letterEvent);
174174

175175
const operation = getOperationFromType(type);
176-
177-
await runUpsert(operation, letterEvent, deps);
178176
metrics.putDimensions({
179177
FunctionName: "upsertLambda",
180-
// eslint-disable-next-line sonarjs/pseudo-random
181-
OddOrEven: `${Math.floor(Math.random() * 10) % 2}`,
182178
OperationType: operation.name,
183179
});
180+
181+
await runUpsert(operation, letterEvent, deps);
184182
metrics.setProperty("operation", operation.name);
185183

186184
metrics.putMetric("MessagesProcessed", 1, Unit.Count);
@@ -191,8 +189,6 @@ export default function createUpsertLetterHandler(deps: Deps): SQSHandler {
191189
);
192190
metrics.putDimensions({
193191
FunctionName: "upsertLambda",
194-
// eslint-disable-next-line sonarjs/pseudo-random
195-
OddOrEven: `${Math.floor(Math.random() * 10) % 2}`,
196192
});
197193
metrics.putMetric("MessageFailed", 1, Unit.Count);
198194
batchItemFailures.push({ itemIdentifier: record.messageId });

0 commit comments

Comments
 (0)