From 4cd2e01e37cc36cf1ca70ae1c052bcf01ef6d14d Mon Sep 17 00:00:00 2001 From: Golda Velez Date: Wed, 17 Apr 2024 10:39:04 -0700 Subject: [PATCH] name the controller metric ANCHOR_REQUEST_ACCEPTED --- src/controllers/request-controller.ts | 2 +- src/settings.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/controllers/request-controller.ts b/src/controllers/request-controller.ts index b029b608..8d2c9e4a 100644 --- a/src/controllers/request-controller.ts +++ b/src/controllers/request-controller.ts @@ -135,7 +135,7 @@ export class RequestController { ) } logger.debug(`Found request for ${requestParams.cid} of stream ${requestParams.streamId}`) - Metrics.count(METRIC_NAMES.ANCHOR_ACCEPTED, 1, { source: parseOrigin(req) }) + Metrics.count(METRIC_NAMES.ANCHOR_REQUEST_ACCEPTED, 1, { source: parseOrigin(req) }) return res.status(StatusCodes.ACCEPTED).json(found) } catch (err: any) { Metrics.count(METRIC_NAMES.REQUEST_NOT_CREATED, 1, { source: parseOrigin(req) }) diff --git a/src/settings.ts b/src/settings.ts index 0bc69fd2..4c57ebc8 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -51,6 +51,8 @@ export enum METRIC_NAMES { ANCHOR_REQUESTS_BATCH_TIME = 'anchor_requests_batch_time', ANCHOR_REQUESTS_BATCH_FAILURE_TIME = 'anchor_requests_batch_failure_time', + ANCHOR_REQUEST_ACCEPTED = 'anchor_request_accepted', // in controller + // *******************************************************************// // Request Service WRITE_TOTAL_TSDB = 'write_total_tsdb', // note _tsdb implies handles high cardinality