Bugsnag-js: How do I turn it off for localhost development?

Created on 26 Feb 2016  路  5Comments  路  Source: bugsnag/bugsnag-js

What's the recommended way?

Most helpful comment

Now it working in this way:

const bugsnagClient = bugsnag({
  apiKey: process.env.REACT_APP_BUGSNAG,
  notifyReleaseStages: [ 'production' ]
});

All 5 comments

Take a look at notifyReleaseStages in the README. For example...

Bugsnag.releaseStage = 'development';
Bugsnag.notifyReleaseStages = ['production', 'staging'];

throw new Error('OMG Something happened!'); // Never gets sent to Bugsnag

Awesome. Thanks!

You're welcome :+1:

Now it working in this way:

const bugsnagClient = bugsnag({
  apiKey: process.env.REACT_APP_BUGSNAG,
  notifyReleaseStages: [ 'production' ]
});

They updated naming from notifyReleaseStages to enabledReleaseStages

Was this page helpful?
0 / 5 - 0 ratings

Related issues

livthomas picture livthomas  路  4Comments

lifeiscontent picture lifeiscontent  路  6Comments

ShawnCholeva picture ShawnCholeva  路  6Comments

mdonjones picture mdonjones  路  5Comments

Andarius picture Andarius  路  3Comments