Gem updated 3.1.4. Asynchronous + Current User.

We’ve a few gem in the latest gem. The Airbrake Gem has just passed 500,000 downloads, making a grand total of over 1,295,000 downloads including the old hoptoad_notifier. If you’re still using the Hoptoad notifier… this is the time to upgrade.

Along with the normal bugfixes and issues. We’ve two new features in this Gem.

  • Asynchronous Notify
  • Current User. Which user was affect by the error.

Asynchronous Notify

When your user experiences error using your application, it gets sent to Airbrake server. This introduces a considerable latency in the response.

Asynchronous notification sending deals with this problem. Airbrake uses girl_friday to achieve this . (thanks Mike)

It’s disabled by default and you can enable it in your Airbrake configuration.

Note that this feature is enabled with JRuby 1.6+, Rubinius 2.0+ and Ruby 1.9+. It does not support Ruby 1.8 because of its poor threading support.

For implementing custom asynchronous notice delivery, send a block to config.async. It receives notice param. Pass it to Airbrake.sender.send_to_airbrake method to do actual delivery. In this way it’s possible to move Airbrake notification even in background worker(e.g. Resque or Sidekiq).

Current User

Airbrake provides information about the current logged in user, so you could easily determine the user who experienced the error in your app.

It uses current_user and current_member to identify the authenticated user, where current_user takes precendence.

If you use different naming, please add the following lines to your controller:

Voila! You’ll get information about a duck that experienced crash about your app.

Download.

3.1.4 is currently available on RubyGems.

View the Gem on Github.

Change Log.