Yeller Notifier for Browser JavaScript

This is the Browser JavaScript client library for http://yellerapp.com. It lets you automatically detect errors in your application, and reports them via Yeller's API, so you can debug and fix them quickly.

How to Install

Include yeller.js from our CDN in the <head> tag of your site, before all other <script> tags.

<script src="//js-yellerapp.a.ssl.fastly.net/yeller.js"></script>

Then immediately configure Yeller in another <script> tag in your <head>

Yeller.configure({
  token: 'YOUR_API_TOKEN_HERE'
});

That's it for basic configuration. There are a few more advanced settings later, but let's get you tracking errors first.

Tracking Errors

yeller.js automatically tracks errors by default, but if you want to manually track one, you can do that like this:

try {
  // your code here
} catch(error) {
  Yeller.report(error);
}

Source Map support

Source maps let you see full stacktraces from your production errors, even for minified JavaScript (or languages that compile to JavaScript). They're extra important for your use of Yeller, because they mean your production errors get much less noisy, because Yeller's deduplication logic understands what's actually going on.

Yeller supports sourcemaps - it's pretty automatic.

All you have to do for Yeller's sourcemaps to work is:

    1. ensure that the minified JavaScript file contains a sourcemap comment (which should be added automatically by your minifier)
    1. ensure that you upload the sourcemap in a place where Yeller can find it. Typically this means you'll be uploading your source somewhere like this:
http://example.com/my_js.min.js

and your sourcemap should go somewhere like this:

http://example.com/my_js.min.js.map

Setting environments

Yeller keeps track of which environment your application is running in, and segregates errors by environment. To set your environment, simply pass it in in your call to Yeller.configure

Yeller.configure({
  token: 'YOUR_API_TOKEN_HERE',
  environment: 'production'
});

Environments are simply strings. As a default, Yeller will ignore errors sent in the test or development environments.

Passing in More Data

yeller.js also lets you attach additional data to your exception. The library already includes information about the page, the web browser and so on. As a note: this extra data (which is arbitrary JSON), should be under the key custom_data.

try {
  // your code here
} catch(error) {
  Yeller.report(error, { custom_data: { user_id: user.id }});
}

You can also report the location. location lets you tell Yeller about the toplevel script, or routing handler, or component etc that is currently active when the exception is thrown.

try {
  // your code here
} catch(error) {
  Yeller.report(error, { location: 'MyApp.MyHandler.run', custom_data: { user_id: user.id }});
}

Attaching more debugging information gives you powerful diagnosis across all your exceptions.

Questions

If you have any questions, feel free to shoot me an email, .

Bugs? Improvements? This Client Library is Open Source

If you're curious about this library, it's open source, and available on: github