If you are not seeing data even after setup, check the following:
Ensure you are starting your application with the
-r ./atatus.jsflag. For example:node -r ./atatus.js ./app/server.jsYou can enable debug flag to know whether anything is getting failed.
copyatatus.start({ licenseKey: "YOUR_LICENSE_KEY", appName: "YOUR_APP_NAME", logLevel: "debug" });
Issue with ES6, Babel, and TypeScript
If you are using ES6, Babel, or TypeScript, ensure you have created the atatus.js initialization file correctly and are using the proper import syntax:
- For JavaScript (ES Modules):
import atatus from 'atatus-nodejs' - For TypeScript:
import * as atatus from 'atatus-nodejs'
Create the atatus.js file in your project root:
copy
// atatus.js - Atatus Agent Initialization
import atatus from 'atatus-nodejs';
atatus.start({
licenseKey: "YOUR_LICENSE_KEY",
appName: "YOUR_APP_NAME"
});
export default atatus;
Start your application with the -r flag:
copy
node -r ./atatus.js ./app/server.js
- Restart your Node.js server.
+1-415-800-4104