Rails 3 comes with instrument support through the ActiveSupport::Notifications class. Call “subscribe” to listen to notifications, and “instrument” to send them.

Read more at the source