-
Notifications
You must be signed in to change notification settings - Fork 13
Compatibility Guide
Working with stacktraces isn't easy in Node.js due to the nature of JavaScript and unfortunately involves a lot of deep integrations into the V8 JavaScript engine. This means that conflicts can arise if more than one module in your Node.js app tries to capture uncaught exceptions or manipulate stacktraces.
This page will serve as a guide on how to avoid these conflicts.
The newrelic module comes with a built-in error collector and is set up to capture uncaught exceptions in your Node.js app.
Opbeat will still capture and report uncaught exceptions, but will not be able to see the stacktrace.
You need to disable the automatic error collector in New Relic. This can be done in one of 3 ways:
- Via the application settings page in New Relic
- Via the
NEW_RELIC_ERROR_COLLECTOR_ENABLEDenvironment variable - Via your
newrelic.jsfile in your app
To disable the errors programmatically, set the error_collector.enabled property to false in your newrelic.js file. This property isn't present by default, but you can easily add it from the snippet below:
error_collector : {
/**
* Disabling the error tracer just means that errors aren't collected
* and sent to New Relic -- it DOES NOT remove any instrumentation.
*/
enabled : false
}Longjohn is module which will show you long stacktraces, i.e. stacktraces across async callbacks.
Uncaught exceptions caught by Opbeat will not have any associated stacktrace
There is no fix for using longjohn at the moment, so currently we do not recommend running with longjohn enabled in production.
There is without a doubt more modules that will cause conflicts and we will update this list with the most popular. But if you experience any of the symptoms above, make sure Opbeat is the only module which captures and handles uncaught exceptions or manipulates the V8 stacktrace in any way.
Feel free to contact us at support@opbeat.com or hit "Help" when logged in if you need help with these or any other issues you encounter :)