---
title: New Hoptoad API and development error tracking
teaser: Hoptoad has a new API.
tags: news,airbrake
author: Joe Ferris
published_on: 2009-11-09
---

## Development Error tracking

Have you ever wanted Hoptoad to tell you whether or not a development exception
has occurred in production? Now it can!

<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,115,0'
  width='560' height='345'>
  <param name='movie'
    value='http://screenr.com/Content/assets/screenr_0817090731.swf' />
  <embed src='http://screenr.com/Content/assets/screenr_0817090731.swf'
    width='560' height='345' />
</object>

When an exception occurs in the development environment and you have the Hoptoad
plug-in installed some JavaScript is quietly inserted into the page. Once the
page is fully loaded it will send the details to Hoptoad asking if a similar
exception has occurred in the production environment. If it has, you get a
message complete with an attention grabbing Atticus. If not, nothing happens.

While this feature is enabled by default, you can easily disable it by setting
`development_lookup` to `false` in `config/initializers/hoptoad.rb`.

    HoptoadNotifier.configure do |config|
      # ...
      config.development_lookup = false
    end

## New Notifier API

If you're an active user of Hoptoad, you've probably noticed the notifier
upgrade message on the site and in notification e-mails. The new notifier has
been greatly refactored and has several improvements, including bug fixes and
improvements for notifier plugin authors. You can learn more about the notifier
plugin by checking out the
[documentation](http://rdoc.info/projects/thoughtbot/hoptoad_notifier). However,
possibly the most important change in the new notifier is that it uses Hoptoad's
new notification API. The new <abbr title="Application Programming
Interface">API</abbr> should make it easier for authors to write notification
plugins, as well as make it easier for us to support the <abbr
title="Application Programming Interface">API</abbr> at a satisfactory level.
There are a few noteworthy improvements there.

The old <abbr title="Application Programming Interface">API</abbr> was built on
top of the Rails params parser, supporting four formats (<abbr title="Uniform
Resource Locator">URL</abbr>-encoded params, <abbr title="JavaScript Object
Notation">JSON</abbr>, YAML, and XML). Although this may seem like a good thing,
it meant that we needed to deal with the performance details of decoding a wide
variety of large data sets from four completely different sources. It also made
the <abbr title="Application Programming Interface">API</abbr> difficult to
document and test, because we had to maintain examples for each format. The new
<abbr title="Application Programming Interface">API</abbr> supports one format
(XML), with clear documentation and a public schema. Only supporting one format
will also make it possible to more efficiently store notice data, which should
allow us to provide more information longer. Finally, a well-tested,
well-documented, simpler <abbr title="Application Programming
Interface">API</abbr> reduces the likilihood of bugs, which ensures that notices
are sent and received as expected.

If you're a user of Hoptoad this means that you'll need to upgrade your notifier
plugin, as the old <abbr title="Application Programming Interface">API</abbr>
will eventually be going away. Using the new API, we'll be able to provide a
faster, more stable way for your application to send us your errors.

If you're a notifier author, this means you'll be able to write your notifier
using fewer lines and less confusion. If you're interested in the Hoptoad
notifier <abbr title="Application Programming Interface">API</abbr> for any
reason, please drop us a line on the [Hoptoad Notifier Development mailing
list](http://groups.google.com/group/hoptoad-notifier-dev).

FYI: _Hoptoad/Airbrake was sold to RackSpace and is now called [Airbrake Bug Tracker](http://airbrake.io)_.
