Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ Node Airbrake Changelog

### master

* Removed the `developmentEnvironments` config option
([#119](https://github.com/airbrake/node-airbrake/pull/112))

### [v1.1.0][v1.1.0] (July 30, 2016)

* **IMPORTANT:** Added support for the Hapi framework
Expand Down
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,6 @@ The version of this app. Set to a semantic version number, or leave unset.

The protocol to use.

### airbrake.developmentEnvironments = []

Do not post to Airbrake when running in these environments.

### airbrake.timeout = 30 * 1000

The timeout after which to give up trying to notify Airbrake in ms.
Expand Down
6 changes: 0 additions & 6 deletions lib/airbrake.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ function Airbrake() {
this.projectRoot = process.cwd();
this.appVersion = null;
this.timeout = 30 * 1000;
this.developmentEnvironments = ['development', 'test'];
this.consoleLogError = false;

this.proxy = null;
Expand Down Expand Up @@ -201,11 +200,6 @@ Airbrake.prototype.addFilter = function(filter) {
Airbrake.prototype.notify = function(err, cb) {
var callback = this._callback(cb);
var exit = false;
// log errors instead of posting to airbrake if a dev enviroment
if (this.developmentEnvironments.indexOf(this.env) !== -1) {
this.log(err);
return callback(null, null, true);
}

this.ignoredExceptions.forEach(function(exception) {
if (err instanceof exception) {
Expand Down
23 changes: 0 additions & 23 deletions test/fast/test-environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,6 @@ var sinon = require('sinon');

var Airbrake = require(common.dir.root);

(function testAddingKeyToDevelopmentEnvironments() {
var airbrake = Airbrake.createClient(null, common.key, 'dev');
airbrake.developmentEnvironments.push('dev');
sinon.stub(airbrake, '_sendRequest');

airbrake.notify(new Error('this should not be posted to airbrake'));

assert.ok(!airbrake._sendRequest.called);
airbrake._sendRequest.restore();
}());

(function testDevelopmentEnviroment() {
var airbrake = Airbrake.createClient(null, common.key, 'dev');
sinon.stub(airbrake, '_sendRequest');

// this should be posted to airbrake simply because we didn't add 'dev' to
// airbrake.developmentEnvironments.
airbrake.notify(new Error('this should be posted to airbrake'));

assert.ok(airbrake._sendRequest.called);
airbrake._sendRequest.restore();
}());

(function testProductionEnviroment() {
var airbrake = Airbrake.createClient(null, common.key, 'production');
sinon.stub(airbrake, '_sendRequest');
Expand Down