From 9a775500230dbbea60d983ac11933a7190e14f54 Mon Sep 17 00:00:00 2001 From: dydxwill <119354122+dydxwill@users.noreply.github.com> Date: Fri, 15 Mar 2024 16:19:53 -0400 Subject: [PATCH] stats (#1185) --- .../api/v4/historical-block-trading-rewards-controller.ts | 2 +- .../v4/historical-trading-reward-aggregations-controller.ts | 2 +- .../comlink/src/request-helpers/export-response-code-stats.ts | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/indexer/services/comlink/src/controllers/api/v4/historical-block-trading-rewards-controller.ts b/indexer/services/comlink/src/controllers/api/v4/historical-block-trading-rewards-controller.ts index 854d73e168..3c35765dd6 100644 --- a/indexer/services/comlink/src/controllers/api/v4/historical-block-trading-rewards-controller.ts +++ b/indexer/services/comlink/src/controllers/api/v4/historical-block-trading-rewards-controller.ts @@ -25,7 +25,7 @@ import { tradingRewardToResponse } from '../../../request-helpers/request-transf import { HistoricalBlockTradingRewardRequest as HistoricalBlockTradingRewardsRequest, HistoricalBlockTradingRewardsResponse } from '../../../types'; const router: express.Router = express.Router(); -const controllerName: string = 'height-controller'; +const controllerName: string = 'historical-block-trading-rewards-controller'; @Route('historicalBlockTradingRewards') class HistoricalBlockTradingRewardsController extends Controller { diff --git a/indexer/services/comlink/src/controllers/api/v4/historical-trading-reward-aggregations-controller.ts b/indexer/services/comlink/src/controllers/api/v4/historical-trading-reward-aggregations-controller.ts index 4bf1237406..fb076e61de 100644 --- a/indexer/services/comlink/src/controllers/api/v4/historical-trading-reward-aggregations-controller.ts +++ b/indexer/services/comlink/src/controllers/api/v4/historical-trading-reward-aggregations-controller.ts @@ -26,7 +26,7 @@ import { tradingRewardAggregationToResponse } from '../../../request-helpers/req import { HistoricalTradingRewardAggregationRequest, HistoricalTradingRewardAggregationsResponse } from '../../../types'; const router: express.Router = express.Router(); -const controllerName: string = 'height-controller'; +const controllerName: string = 'historical-trading-reward-aggregations-controller'; @Route('historicalTradingRewardAggregations') class HistoricalTradingRewardAggregationsController extends Controller { diff --git a/indexer/services/comlink/src/request-helpers/export-response-code-stats.ts b/indexer/services/comlink/src/request-helpers/export-response-code-stats.ts index c43e244291..999cc83b19 100644 --- a/indexer/services/comlink/src/request-helpers/export-response-code-stats.ts +++ b/indexer/services/comlink/src/request-helpers/export-response-code-stats.ts @@ -15,6 +15,10 @@ export default (options?: ResponseStatsOptions) => ( response.on('finish', () => { stats.increment(`${config.SERVICE_NAME}.${options?.controllerName}.response_status_code.${response.statusCode}`, 1, { path: request.route.path, method: request.method }); + stats.increment(`${config.SERVICE_NAME}.${options?.controllerName}.response_status_code`, + 1, { path: request.route.path, method: request.method }); + stats.increment(`${config.SERVICE_NAME}.response_status_code.${response.statusCode}`, + 1, { path: request.route.path, method: request.method }); }); return next();