diff --git a/lib/middleware/onerror.js b/lib/middleware/onerror.js index ec4bacf6b9..faf0331588 100644 --- a/lib/middleware/onerror.js +++ b/lib/middleware/onerror.js @@ -35,6 +35,7 @@ module.exports = async (ctx, next) => { if (config.sentry) { Sentry.withScope((scope) => { scope.setTag('route', ctx._matchedRoute); + scope.setTag('name', ctx.request.path.split('/')[1]); scope.addEventProcessor((event) => Sentry.Handlers.parseRequest(event, ctx.request)); Sentry.captureException(err); });