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-node") 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.

    atatus.start({ apiKey: "YOUR_API_KEY", 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-node") 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-node");
atatus.start({ apiKey: "Your_api_key" });

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

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