ember-bugsnag
v0.2.1
Published
Adds the Bugsnag.js library to your Ember CLI app, and configures it to handle errors from Ember.
Downloads
20
Readme
ember-bugsnag
Adds the Bugsnag.js library to your Ember app, and configures it to handle errors from Ember and the browser.
Installation
Requires Ember 2.3+
ember install ember-bugsnag
Configuration
ember-bugsnag
will look for configuration options in your app's environment
under the bugsnag
key. This means you can access any of the public API
configuration options accepted by Bugsnag.js.
Example:
// config/environment.js
ENV['bugsnag'] = {
apiKey: 'SUPER_SECRET',
};
ember-bugsnag
will automatically set Bugsnag.releaseStage
to match the
environment in which your app is running.
For all the available configuration options, see Bugsnag.js Readme.
Usage
Bugsnag is available within your controllers and routes, allowing you to customise the behaviour of Bugsnag and send custom notifications.
It also allows you to use Bugsnag's user
and metaData
attributes.
Example:
// routes/application.js
// Example using simple-auth.
sessionAuthenticationSucceeded: function(){
this._super();
var user = this.get('currentUser');
this.get('bugsnag').user = user.getProperties('id', 'email');
}
...
Running in development
ember server
- Visit your app at http://localhost:4200.
Running Tests
ember test
ember test --server
Building
ember build
For more information on using ember-cli, visit http://www.ember-cli.com/.