AppDynamics Application Intelligence Platform
1. Download the tarball file for the App Agent for Node.js from the AppDynamics beta download zone.
If you do not have access to the beta zone, please request it from your account manager and/or email the Node.js Product Manager: firstname.lastname@example.org.
2. Be prepared to provide the following information:
3. You need permission to perform a package installation and to edit the application source code to complete the installation.
There are two steps to instrument your Node.js applications:
From the root directory of the Node.js application run the command:
For every Node.js application that you are instrumenting, insert the following call in the application source code at the first line the main module (such as the server.js file), before any other require statements.
If you are launching a cluster of Node processes to implement your app, add this appdynamics require statement to the master process code and to the code of each of the worker processes.
There is an agent log and a proxy log for each application.
If the agent is running in debug mode, the agent component logs to stdout/stderr. This log contains the transactions that the agent processes and sends to the proxy. This log is available in the same location to which stdout/stderr streams are directed from the monitored application.
If debug mode is not enabled, no agent log is generated.
You set debug mode is in the require statement that instruments your Node.js application. See Modifying the Application Code.
The proxy logs the transactions that it accepts from the agent and sends to the Controller. The proxy generates logs whether or not the agent is running in debug mode.
When the agent component launches the proxy, it displays in the agent log the directory path to which the proxy is logging.
If you install the Machine Agent on the machine hosting the instrumented Node.js node and you specify the tier and node name in the machine agent's controller-info.xml file, the App Agent for Node.js will fail to register.
To avoid this problem: