Audit::Ovl provides a Rack middleware that tracks SQL queries using ActiveSupport::Notifications. It allows setting a query budget and warns or logs when the budget is exceeded.
>= 3.0.0
arshdeep