Hello, I am using the profiling tool on my app.
I use NodeJS v0.10.29 with npm v3.3.9.
I successfully installed appdynamics@4.1.4 (Run on debian 8.2)
I put the required piece of code in my app.js
require("appdynamics").profile({
controllerHostName: 'paidxxx.saas.appdynamics.com',
controllerPort: 80,
accountName: 'xxx',
accountAccessKey: 'xxx',
applicationName: 'xxx',
tierName: 'xxx',
nodeName: 'process'
});
Now, for any POST JSON request I make the server fails with
Error: invalid json, empty body at Object.exports.error (/home/xxx/yyy/node_modules/express/node_modules/connect/lib/utils.js:62:13) at IncomingMessage.<anonymous> (/home/xxx/yyy/node_modules/express/node_modules/connect/lib/middleware/json.js:61:29) at IncomingMessage.emit (events.js:92:17) at _stream_readable.js:929:16 at appd_proxy (/home/xxx/yyy/node_modules/appdynamics/lib/core/proxy.js:289:20) at process._tickDomainCallback (node.js:463:13)
I made some little researches, and it looks like it has something to do with `connect` that Express is using.
I can hardly change its version without breaking everything.
Is there a way to make the profiling tool work with my current project?
Thank you
Hi.
Make sure you've successfully installed the npm package for AppDynamics. Also, the location of the "require" statement can effect functionality.
https://docs.appdynamics.com/display/PRO41/Install+the+Node.js+Agent