Skip to content

Commit

Permalink
add aggregate comlink response code stats
Browse files Browse the repository at this point in the history
  • Loading branch information
dydxwill committed Mar 11, 2024
1 parent 5e0fd8b commit c7b4038
Showing 1 changed file with 2 additions and 0 deletions.
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}.response_status_code.${response.statusCode}`,
1, { path: request.route.path, method: request.method });
});

return next();
Expand Down

0 comments on commit c7b4038

Please sign in to comment.