Skip to content

Commit e26fa97

Browse files
use distinct the name for the new metric
1 parent 3e690b4 commit e26fa97

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

lambdas/supplier-allocator/src/handler/allocate-handler.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ function emitMetrics(
147147
function emitSupCampaignClientMetric(
148148
letterEvent: PreparedEvents,
149149
supplier: string,
150-
status: MetricStatus,
150+
status: string,
151151
deps: Deps,
152152
) {
153153
const namespace = "supplier-allocator";
@@ -242,7 +242,7 @@ export default function createSupplierAllocatorHandler(deps: Deps): SQSHandler {
242242
emitSupCampaignClientMetric(
243243
letterEvent,
244244
supplier,
245-
MetricStatus.Success,
245+
"supplier_Campaign_Client",
246246
deps,
247247
);
248248
} catch (error) {
@@ -254,12 +254,6 @@ export default function createSupplierAllocatorHandler(deps: Deps): SQSHandler {
254254
});
255255
incrementMetric(perAllocationFailure, supplier, priority);
256256
batchItemFailures.push({ itemIdentifier: record.messageId });
257-
emitSupCampaignClientMetric(
258-
letterEvent as PreparedEvents,
259-
supplier,
260-
MetricStatus.Failure,
261-
deps,
262-
);
263257
}
264258
});
265259

0 commit comments

Comments
 (0)