Monitor Ember app errors with Rollbar

By Matt Layman on January 3, 2017

One fact that I’ve come to accept as an experienced developer is that errors will happen. Guaranteed. The reasons for this situation are vast. Perhaps there are quirks in a browser you didn’t test. Or perhaps the user did something that you didn’t plan for. You can’t anticipate every situation. Knowing that errors will happen means you have two choices. You can ignore this fact and let your users suffer (at the risk of losing them). Or, you can record these errors and fix them to improve your application. I recently set up Rollbar for College Conductor and wanted to share my experience.

Rollbar is a service that let’s you record your errors wherever they happen. Error information is stored with your Rollbar account so you can examine a problem and decide how to fix it.

If you’re developing an Ember application, you can quickly integrate your app with Rollbar. Let’s see how. Begin by installing an Ember CLI addon for Rollbar:

$ ember install ember-cli-rollbar

Once the addon is installed, it needs to be configured to communicate with Rollbar. In your config/environment.js file, add a section like this:

var ENV = {
  rollbar: {
    accessToken: 'your post_client_item token'
  }
};

Rollbar has a few different tokens available on your access tokens settings page. The correct one to use with Ember is the post_client_item token.

With that configuration done, you’re ready to go! When the Ember app is not in development mode, errors will be reported to Rollbar.

Good luck with your app. I hope this information helps you improve your project for your users. In a few mere weeks of use, Rollbar has already helped me track down a number of problems. I’m sure it can do the same for you.

If you want to chat about this with me, I'm @mblayman on Twitter.



Matt Layman

Matt is the lead software engineer at Storybird.

Always eager to talk about Python and other technology topics, Matt organizes Python Frederick in Frederick, Maryland (NW of Washington D.C.) and seeks to grow software skills for people in his community.