File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
lambdas/upsert-letter/src/handler Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -176,6 +176,8 @@ export default function createUpsertLetterHandler(deps: Deps): SQSHandler {
176176 metrics . putDimensions ( {
177177 FunctionName : "upsertLambda" ,
178178 OperationType : operation . name ,
179+ // eslint-disable-next-line sonarjs/pseudo-random
180+ OddOrEven : `${ Math . floor ( Math . random ( ) * 10 ) % 2 } ` ,
179181 } ) ;
180182
181183 await runUpsert ( operation , letterEvent , deps ) ;
@@ -189,6 +191,8 @@ export default function createUpsertLetterHandler(deps: Deps): SQSHandler {
189191 ) ;
190192 metrics . putDimensions ( {
191193 FunctionName : "upsertLambda" ,
194+ // eslint-disable-next-line sonarjs/pseudo-random
195+ OddOrEven : `${ Math . floor ( Math . random ( ) * 10 ) % 2 } ` ,
192196 } ) ;
193197 metrics . putMetric ( "MessageFailed" , 1 , Unit . Count ) ;
194198 batchItemFailures . push ( { itemIdentifier : record . messageId } ) ;
You can’t perform that action at this time.
0 commit comments