From 52f45194bb98caf6bf951f0cfcaaa30cead7c654 Mon Sep 17 00:00:00 2001 From: Will Liu Date: Fri, 15 Mar 2024 15:46:57 -0400 Subject: [PATCH] fix stats prefix for trading rewards API --- .../api/v4/historical-block-trading-rewards-controller.ts | 2 +- .../api/v4/historical-trading-reward-aggregations-controller.ts | 2 +- .../comlink/src/request-helpers/export-response-code-stats.ts | 2 ++ 3 files changed, 4 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 ff82c3b97e..8b57ffd3d6 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 @@ -24,7 +24,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 878c96d288..777a3ff78d 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 @@ -25,7 +25,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 c2565b8d4b..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,8 @@ 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 }); });