From 21a7ef950498e93bf1581a994750283a9b768cad Mon Sep 17 00:00:00 2001 From: Yongseok Kang Date: Tue, 3 Aug 2021 15:50:11 +0900 Subject: [PATCH] #86 rename refactoring --- lib/instrumentation/module/express.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/instrumentation/module/express.js b/lib/instrumentation/module/express.js index d3eabee4..3fe7b883 100644 --- a/lib/instrumentation/module/express.js +++ b/lib/instrumentation/module/express.js @@ -52,7 +52,6 @@ module.exports = function (agent, version, express) { const result = original.apply(this, arguments) const fn = arguments && arguments[1] if (fn && fn.name !== 'router' && this.stack && this.stack.length) { - // log.debug('>> [Express] express.Router.use ', this.stack[this.stack.length - 1]) const layer = this.stack[this.stack.length - 1] doPatchLayer(layer, 'middleware', layer.name) } @@ -63,12 +62,12 @@ module.exports = function (agent, version, express) { // https://expressjs.com/en/4x/api.html shimmer.wrap(express.Router, 'route', function (original) { return function () { - const result = original.apply(this, arguments) + const route = original.apply(this, arguments) if (this.stack && this.stack.length) { const layer = this.stack[this.stack.length - 1] doPatchLayer(layer, 'route', layer.name,) } - return result + return route } })