Little green friend

Posted by Matt Jankowski

Jul 18

Here’s a brief introduction to a new application we’ve been working on. The application is called hoptoad, and it’s a hosted web service which can be used as an error reporting and analysis tool by Rails applications. The service is running in the Engine Yard cloud and will be completely free when it launches, so go ahead and sign up to that mailing list and we’ll let you know when it’s live.

For the academically curious, the word “hoptoad” is railroad industry slang for a derailed train. At least, it used to be when the railroad industry had slang.

Background

We’ve been using Jamis Buck’s “Exception Notifier” Rails plugin for years now, and for the most part it’s accomplished what we wanted. For the uninitiated, the Exception Notifier plugin catches all errors that haven’t already been caught, and sends an email with a formatted error report about what happened, where it happened, the session data, the params, the environment info, etc.

We’ve used this with great success, probably on ~30 projects or so, and it’s been a reliable way to know when there is an issue with one of the production applications you are maintaining.

Problems

The problems we ultimately ran into here…

Solution

As you may have guessed, we’ve solved these problems, and replaced the Exception Notifier in most of the apps we manage, with a homegrown solution called hoptoad. Hoptoad is two things:

Plugin

By default, the hoptoad notifier plugin requires only one configuration option: the API key for the project the plugin is installed into, so that it can be properly stored. In addition to that, it is possible to specify a set of errors that you’d like the plugin to ignore (it has a default set to ignore and not report on, which you may override). The plugin, and sample configuration, are available from the project configuration area within the application.

Web application

The application is responsible for grouping errors, marking inactive errors, providing rss feeds of groups of errors, managing user access to error reports, handling incoming errors from the plugin via an API, etc.

We expect to the public launch to be sometime next week, so stay tuned.

If my train goes off the track, 
pick it up, pick it up, pick it up back back 
back to the grill again, the grill again 
friends 
how many MC's must get dissed?

-KRS One


Comments on this post

George Anderson

Jul 18

George Anderson said,

The links in this post to http://www.hoptoadapp.com are dead. But http://hoptoadapp.com is good. Perhaps some quick DNS config is in order.

Looking forward to the release.

Matt Jankowski

Jul 18

Matt Jankowski said,

Thanks George, links updated.

Colin

Jul 18

Colin said,

Good stuff guys, we’ve been talking about putting something like this together internally since we first started using Exception Notifier. This going to be something free and open source? Or a commercial service?

Matt Jankowski

Jul 18

Matt Jankowski said,

The plugin will be open by requirement (because you’ll have to install it in your app). The collection service and webapp will be free to use when we launch, but only available as a hosted service, not as something you can run yourself.

Both of those things ($ cost and hosted-only) are subject to re-evaluation as we continue to expand the application.

Wyatt Greene

Jul 18

Wyatt Greene said,

Wow, that looks really useful!

Tim Gourley

Jul 18

Tim Gourley said,

I can’t wait to check it out!

Dr J

Jul 18

Dr J said,

Cool. Looking forward to something like this

Gaius

Jul 18

Gaius said,

It’d be really wonderful if you made this SOA compatible by supporting logging calls via WS-*. Logging is going to be one of many services that become more important as SOA grows. (Plus, it’d really start to show those corporate people that Ruby is enterprise worthy.)

Matt Jankowski

Jul 18

Matt Jankowski said,

Gaius – we do have a very basic logging mechanism built in, so that you can send the service more than just error data. This is something we need to use ourselves more before knowing what the correct solution is.

chris finne

Jul 19

chris finne said,

Sounds great, but what happens if hoptoad goes down, gets overloaded, DNS server doing the lookup for your service gets overloaded, etc. ?

Probably the same thing that can happen to the Exception Notifier if a mail server is having issues: the Rails process hangs. (this was a painful lesson for me)

With Exception Notifier, I prefer to have it use a local sendmail setup which will returns immediately and queues up the mail to be sent (or resent) outside the Rails stack.

Any plans to have some sort of async method to send it?

Darragh Curran

Jul 19

Darragh Curran said,

Sounds great – there’s another very similar app worth checking out by some peeps I know – http://www.getexceptional.com/ great minds think alike

Matt Jankowski

Jul 19

Matt Jankowski said,

@chris – good point, that’s another thing that’s burned us while using the EN. I’m not sure if this will be in place for launch, but we do intend to introduce some sort of local queue so that the plugin can handle the error and immediately return control to rails, and then asynchronously deal with making sure the errors get reported to the server.

Magnus Holm

Jul 19

Magnus Holm said,

How hard would it be to add support to other frameworks?

Matt Jankowski

Jul 19

Matt Jankowski said,

@magnus – we’re launching this as a rails-only, and the plugin we distribute will be specifically for use in rails applications. With very few exceptions, all of the applications we’re maintaining that are in production are all rails applications, so that’s where our need is.

That being said, there’s nothing we’re doing to block out the future possibility of supporting other frameworks. I suspect that adding support for a non-rails ruby web framework (merb, camping, etc) would be fairly straightforward.

Nicolás Sanguinetti

Jul 20

Nicolás Sanguinetti said,

Matt, regarding other frameworks, is there something on your end that disallows exceptions that don’t come from rails?

I don’t see how difficult could it be to produce something for other frameworks/libraries/straight-out ruby scripts that will just post to hoptoad using your API, “stolen” from the rails plugin.

Just dreaming a little (I’m not sure it can be done this way, and we have to wait for you guys to see =P), some rack middleware could be written and voila, all rack-based frameworks can cascade down from this.

Matt Jankowski

Jul 21

Matt Jankowski said,

Nicolas – no, there’s nothing specifically that makes me think it would be hard. We just haven’t thought about it yet.

zoomn

Jul 22

zoomn said,

rap-nerd that i am i just have to point out that the quote at the end is not solely from krs but partly from black sheep(lines 1+2) and mc serch (line 3). nice plugin though!

zoomn

Jul 22

zoomn said,

sorry, application not plugin…


Sorry, comments are closed for this article.

© 2000 - 2009 by thoughtbot, inc.
written by a bushel of tiny robots