Chapter 7Managing Application Events with Mountable Engines

  • ActiveSupport::Notifications API

  • Rails mountable and isolated engines

  • Rack, middleware stacks, and custom middleware

Since Ruby on Rails’s early days, people have wondered what happens inside of their applications. How many queries were performed in this request? How long did this request take?

To address this common concern, a few open source projects (such as Footnotes and Bullet[38][39]) and services (such as Scout and New Relic’s RPM[40][41]) were built. Since all those different tools needed to extract this information from Rails, Rails evolved to provide a centralized way to publish and subscribe to events happening inside an application with the ActiveSupport::Notifications ...

Get Crafting Rails 4 Applications, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.