Atatus captures all exceptions and errors in your Node.js applications by default. To capture console.error messages specifically, you need to enable the captureConsoleErrors setting.

Configuration Options

Option Description Type
captureConsoleErrors Enable capturing of console.error messages as errors boolean

Sample Node.js Agent Configuration:

module.exports = {
  captureConsoleErrors: true
}

Environment Variable Configuration:

ENVIRONMENT Configuration Example
ATATUS_CAPTURE_CONSOLE_ERRORS captureConsoleErrors true or false

How to Enable captureConsoleErrors

Use one of the following methods to enable this setting:

Option 1: Using atatus-config.js

module.exports = {
    licenseKey: "YOUR_LICENSE_KEY",
    appName: "YOUR_APP_NAME",

    captureConsoleErrors: true
};

Option 2: Using start function

atatus.start({
    licenseKey: "YOUR_LICENSE_KEY",
    appName: "YOUR_APP_NAME",

    captureConsoleErrors: true
});

Option 3: Using Environment Variables

# set to env file
export ATATUS_LICENSE_KEY="YOUR_LICENSE_KEY"
export ATATUS_APP_NAME="YOUR_APP_NAME"

export ATATUS_CAPTURE_CONSOLE_ERRORS=true

This setting ensures that every console.error message is reported as an error, helping your team stay informed of issues in real time.