Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

Commit

Permalink
Merge pull request #175 from newrelic/fix-paramware
Browse files Browse the repository at this point in the history
  • Loading branch information
bizob2828 authored Mar 22, 2024
2 parents 5d98a06 + a8bce24 commit ed23cf4
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions lib/router-instrumentation.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,18 @@ module.exports = function instrumentRouter(shim, Router) {
}

function wrapParamware(shim, paramware, fnName, route) {
return shim.recordParamware(paramware, {
name: route,
next: shim.LAST,
promise: true,
appendPath: false,
req: function getReq(shim, fn, _fnName, args) {
return args[1] && args[1].req
}
})
return shim.recordParamware(
paramware,
new shim.specs.MiddlewareSpec({
name: route,
next: shim.LAST,
promise: true,
appendPath: false,
req: function getReq(shim, fn, _fnName, args) {
return args[1] && args[1].req
}
})
)
}

function wrapMiddleware(shim, fn, name, layer) {
Expand Down

0 comments on commit ed23cf4

Please sign in to comment.