Skip to content

Commit

Permalink
fix stats prefix for trading rewards API (#1184)
Browse files Browse the repository at this point in the history
  • Loading branch information
dydxwill authored Mar 15, 2024
1 parent 085b88e commit 1a971d0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
});
Expand Down

0 comments on commit 1a971d0

Please sign in to comment.