You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@thawatchai It is definitely workable. The gem uses ActiveSupport::Notifications to notify of N+1 queries. Just make sure whatever you have subscribed to the notification is also fast.
I've had code that looks something like this in production for years without issue:
ActiveSupport::Notifications.subscribe("n_plus_one_query") do |_event, data|
Stats.increment("site.web.n_plus_one_queries.by_class", tags: ["class:#{data[:source].class.name}", "association:#{data[:association]}"])
end
Do you think it's workable to enable n+1 query tracking in production? Will it add much extra resource requirements to the production environment?
The text was updated successfully, but these errors were encountered: