You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In version v10 of Node.js agent, we added the ability to instrument a module more than once. This shifted indicators of if a module was instrumented from the export to the hook. It was discovered that if you have multiple versions of a module that is instrumented in an application the 2nd instance never registers instrumentation.
Steps to Reproduce
Create an application that contains multiple versions of same module.
Try to require both versions and verify the instrumentation is registered.
Assumption: express 4.18.2 is installed, and express 4.18.1 is installed into test-mod
constnewrelic=require('newrelic')constsymbols=require('newrelic/lib/symbols')constexpress=require('express')consttestMod=require('test-mod/node_modules/express')console.log('Is express wrapped?',!!express.application.use[symbols.wrapped])console.log('Is different version of express wrapped?',!!testMod.application.use[symbols.wrapped])
Is express wrapped?true
Is different version of express wrapped?false
The text was updated successfully, but these errors were encountered:
Description
In version v10 of Node.js agent, we added the ability to instrument a module more than once. This shifted indicators of if a module was instrumented from the export to the hook. It was discovered that if you have multiple versions of a module that is instrumented in an application the 2nd instance never registers instrumentation.
Steps to Reproduce
Assumption: express 4.18.2 is installed, and express 4.18.1 is installed into
test-mod
The text was updated successfully, but these errors were encountered: