Ember.js is a powerful client-side JavaScript framework that is being widely used. Atatus integrates with Ember.js in few lines, allowing you to identify and debug the errors easily.

Agent Installation

If you want to include Atatus script with your source, you can add it through package managers such as CDN, YARN and NPM.

With NPM

Installation

  1. Install atatus-js from the npm registry:

    copy
    icon/buttons/copy
    npm install --save atatus-js
    

    Import and initialize atatus to monitor your application:

    copy
    icon/buttons/copy
    import * as atatus from 'atatus-js';
    atatus.config('YOUR_API_KEY').install();
    

    For more advanced options on installing your monitoring code, view customizing agent.

  2. Add atatus to the ember error handler

    copy
    icon/buttons/copy
    var reportError = function(error) {
      if (window.atatus) {
        window.atatus.notify(error);
      }
    };
    Ember.onerror = reportError;
    Ember.RSVP.on('error', reportError);
    App.ApplicationRoute = Ember.Route.extend({ actions: { error: reportError } });
    

Test Integration

To verify that your integration is working, call notify() in your application:

copy
icon/buttons/copy
atatus.notify(new Error('Test Atatus Setup'));

An error will appear in your project dashboard.

With YARN

Installation

  1. Install atatus-js from the npm registry:

    copy
    icon/buttons/copy
    yarn add atatus-js
    

    Import and initialize atatus to monitor your application

    copy
    icon/buttons/copy
    import * as atatus from 'atatus-js';
    atatus.config('YOUR_API_KEY').install();
    

    For more advanced options on installing your monitoring code, view customizing agent.

  2. Add atatus to the ember error handler

    copy
    icon/buttons/copy
    var reportError = function(error) {
      if (window.atatus) {
        window.atatus.notify(error);
      }
    };
    Ember.onerror = reportError;
    Ember.RSVP.on('error', reportError);
    App.ApplicationRoute = Ember.Route.extend({ actions: { error: reportError } });
    

Test Integration

To verify that your integration is working, call notify() in your application:

copy
icon/buttons/copy
atatus.notify(new Error('Test Atatus Setup'));

An error will appear in your project dashboard.

With CDN

Installation

  1. Copy & paste this code into the <head> tag of your html (every page) to start using Atatus on your site. Please make sure that you add it before other script tags as well.

    copy
    icon/buttons/copy
    <script src="//dmc1acwvwny3.cloudfront.net/atatus.js"></script>
    <script type="text/javascript">atatus.config('YOUR_API_KEY').install();</script>
    

    For more advanced options on installing your monitoring code, view customizing agent.

  2. Add atatus to the ember error handler

    copy
    icon/buttons/copy
    var reportError = function(error) {
      if (window.atatus) {
        window.atatus.notify(error);
      }
    };
    Ember.onerror = reportError;
    Ember.RSVP.on('error', reportError);
    App.ApplicationRoute = Ember.Route.extend({ actions: { error: reportError } });
    

Test Integration

To verify that your integration is working, call notify() in your application:

copy
icon/buttons/copy
atatus.notify(new Error('Test Atatus Setup'));

An error will appear in your project dashboard.

Track exceptions in Ember apps

To collect errors from Ember app, you need to set up the Ember.onerror handler for your app. You can do that using the following code snippet:

copy
icon/buttons/copy
var reportError = function(error) {
    if (window.atatus) {
        window.atatus.notify(error);
    }
};

// Log Emberjs errors
Ember.onerror = reportError;

// Log Ember promise errors
Ember.RSVP.on('error', reportError);

// Log Ember route errors
App.ApplicationRoute = Ember.Route.extend({ actions: { error: reportError } });