Skip to content
Daniel Higginbotham edited this page Jul 8, 2011 · 1 revision

Whoops

Overview

Purpose

whoops was originally conceived as an alternative to Hoptoad. Its allows you to:

  • Log arbitrary events. Whoops events use an event_type field which can be any string – exception, notification, warning, etc.
  • Log arbitrary details. Events are stored in mongodb, giving you the flexibility of a document database.
  • Search event details. The search parser maps text to mongoid conditions, allowing you to do queries like “details.current_user_id#in [123, 423]”
  • Extend the app. Since it’s a rails engine, you can make changes to your base rails app without worrying about merge difficulties when you upgrade whoops.

If you find yourself bumping up against limitations in Hoptoad, whoops might be right for you.

Design

whoops consists of two main components: the rails 3 engine and the notifier. Hosting is up to you. The engine provides the following:

  • Controllers and views for viewing, filtering, and searching events.
  • An end point for receiving event notifications
  • A mailer for sending email notifications
  • Mongoid models

The notifier is documented separately. Briefly, it allows you to create strategies for building an event notification. It also allows you to modify existing strategies.

For example, you could use the rails 3 notifier , but modify it to include the ID of the currently logged in user. If your app ran background processes, you could create a notification strategy specific to your processes. Both strategies can coexist in the same app.

Usage

Installation

  1. create a new rails app
  2. add gem "whoops" to your Gemfile
  3. run bundle
  4. run bundle exec rails g whoops:assets – this copies assets to your public directory (whoops isn’t 3.1 compatible yet)
  5. optional add root :to => "event_groups#index" to your routes file to make the event group listing your home page
  6. add notifiers to the code you want to monitor (documentation forthcoming)

Filtering

Searching

Code

Architecture

Extending

Other design notes

TODO

  • finish notifications
  • site-wide search
  • graphing

License

This project uses MIT-LICENSE.