Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix stats prefix for trading rewards API #1184

Merged
merged 1 commit into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading