This documentation is deprecated. Please refer our new documentation here

FAQTroubleshootingWhy could I not see the data in Node.js APM?

If you are not seeing data even after setup, Can you please check the following:

  • The require("atatus-nodejs") should be the first line of your server code. It must be placed above all other 'require' statements in your 'server.js' or 'index.js'. Most of the time, this is the root cause.
  • Atatus agent only reports data once per minute. If you start and stop the server with in a minute, Atatus will not report any data. It mostly happens in AWS Lambda projects or serverless architectures. You can fix it by calling 'atatus.stop' before end of the request.

    atatus.stop({ reportBeforeStop: true });
  • You can enable 'debug' flag to know whether anything is getting failed.

        licenseKey: "YOUR_LICENSE_KEY",
        appName: "YOUR_APP_NAME",
        logLevel: "debug"
Issue with ES6 and Babel

If you are using ES6 with Babel, you might not receive the data even though you have added require("atatus-nodejs") in the first line. This happens because Babel does not execute it in order. Somehow module such as Express, MongoDB, etc is loaded before Atatus agent.

You can fix it by creating new startup file 'index.js' and require your 'app.js' inside that file.

// index.js
var atatus = require("atatus-nodejs");
    licenseKey: "YOUR_LICENSE_KEY",
    appName: "YOUR_APP_NAME"

module.exports = require('./app.js');

Then execute the 'index.js' instead of 'app.js' using babel.