UPDATE AS OF 5/20/2019
Version 5.9.0 of the Node.js Agent released the
instrumentLoadedModule API call that can be used as a workaround to instrument applications that use Webpack.
Please read more on how to use this API call in our docs here:
For more information as to why the Node.js Agent and the Webpack have troubles working together please continue reading below.
The Node.js application environment is constantly growing and changing. At New Relic, we work diligently to be sure we can meet customers where they are, providing tools to instrument their applications and gain valuable insight for performance tuning and accurate monitoring.
As we continue expanding our instrumentation of popular Node.js modules and frameworks, there remain some modules that can cause issues with the Node.js APM agent. One of these unsupported modules is webpack, and it is my goal here to explain how this tool is used with server-side Node.js applications and why it is currently not supported.
What does webpack do?
How does this affect the Node.js APM agent?
What does this mean for me?
At this time, there is currently no way for the Node.js APM agent to gather accurate application information from server-side Node applications using webpack. If you are using webpack to bundle your Node.js server code, please take a moment to stop by our Feature Idea area of the Explorers Hub and add your vote to the webpack support request there.
Feature Idea Topic for webpack Support:
Any additional detail you can provide about how you use this tool and why it is necessary for your server application will be helpful to our product teams as they prioritize what to include on future releases of the agent. (If you are really invested, you can also file a feature request directly with the maintainers of webpack to ask that they add instrumentation hooks that would allow our agent to work with code bundled using webpack!)