Skip to content
This repository was archived by the owner on Jun 12, 2018. It is now read-only.

Compatibility Guide

Thomas Watson Steen edited this page Jan 23, 2015 · 6 revisions

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.

New Relic

The newrelic module comes with a built-in error collector and is set up to capture uncaught exceptions in your Node.js app.

Symptoms

Opbeat will still capture and report uncaught exceptions, but will not be able to see the stacktrace.

Fix

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_ENABLED environment variable
  • Via your newrelic.js file 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

Longjohn is module which will show you long stacktraces, i.e. stacktraces across async callbacks.

Symptoms

Uncaught exceptions caught by Opbeat will not have any associated stacktrace

Fix

There is no fix for using longjohn at the moment, so currently we do not recommend running with longjohn enabled in production.

Other modules?

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 :)

Clone this wiki locally