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
Prior to v11.0.0 of the agent, you could use the API instrument, instrumentMessages, etc to instrument any file. The moduleName had to be the first time the package is required. In v11.0.0 we switched to use require-in-the-middle to instrument CommonJS modules.
In the v11.0.0 changelog we did call out: "You can no longer instrument files that are not within a node_module unless you provide an absolute path to the file when registering the instrumentation." However, that's not entirely possible.
Expected Behavior
Provide ability to instrument a file that's not within a 3rd party package.
Follow readme but upgrade to latest agent npm i newrelic@latest
Run npm start
Additional context
This probably doesn't affect any customers. It just makes it easier for us to show how to use the instrument API methods by building some contrived "module" but have it live within the application.
The text was updated successfully, but these errors were encountered:
Description
Prior to v11.0.0 of the agent, you could use the API
instrument
,instrumentMessages
, etc to instrument any file. The moduleName had to be the first time the package is required. In v11.0.0 we switched to userequire-in-the-middle
to instrument CommonJS modules.In the v11.0.0 changelog we did call out: "You can no longer instrument files that are not within a node_module unless you provide an absolute path to the file when registering the instrumentation." However, that's not entirely possible.
Expected Behavior
Provide ability to instrument a file that's not within a 3rd party package.
You should see this in the output of repro app
Steps to Reproduce
npm i newrelic@latest
npm start
Additional context
This probably doesn't affect any customers. It just makes it easier for us to show how to use the instrument API methods by building some contrived "module" but have it live within the application.
The text was updated successfully, but these errors were encountered: