Digging Deep with ActiveSupport::Notifications — Librato Blog

Digging Deep with ActiveSupport::Notifications

Nik Wekwerth

Rails 3 and above includes a powerful instrumentation system, ActiveSupport::Notifications, which can be used to track performance and event information for all aspects of your application. Notifications are light-weight, easy to setup, and can be consumed by multiple subscribers (logs, audit trails, consolidated metrics, other parts of your application).

Our very own Matt Sanders (@nextmat) did a talk on AS:Notifications at RailsConf 2012:

His talk starts with the basics of ActiveSupport::Notifications and also discusses powerful advanced use cases. Topics that are explored include:

  • How to set up and use notifications
  • Logging what you want from any tier of your system
  • How to capture and aggregate performance/business data for the metrics you care about most
  • Conditional monitoring in production: flag on and off data by system or customer to get to the root of problems more quickly
  • Using ActiveSupport::Notifications in non-Rails applications and your own libraries

The slides are also available on Speaker Deck.