FIX: rack-mini-profiler not showing plugin frames

FIX: rack-mini-profiler not showing plugin frames

Previously the default stack suppressor in rack-mini-profiler was excluding the plugin directory.

This made islolating issues more complicated cause you needed to defer to pp=full-backtrace which is both slow and noisy

diff --git a/config/initializers/006-mini_profiler.rb b/config/initializers/006-mini_profiler.rb
index b1f47d9..a717c48 100644
--- a/config/initializers/006-mini_profiler.rb
+++ b/config/initializers/006-mini_profiler.rb
@@ -73,6 +73,8 @@ if defined?(Rack::MiniProfiler) && defined?(Rack::MiniProfiler::Config)
   Rack::MiniProfiler.config.backtrace_ignores << /config\/initializers\/silence_logger/
   Rack::MiniProfiler.config.backtrace_ignores << /config\/initializers\/quiet_logger/
 
+  Rack::MiniProfiler.config.backtrace_includes = [/^\/?(app|config|lib|test|plugins)/]
+
   # Rack::MiniProfiler.counter_method(ActiveRecord::QueryMethods, 'build_arel')
   # Rack::MiniProfiler.counter_method(Array, 'uniq')
   # require "#{Rails.root}/vendor/backports/notification"

GitHub sha: 10b36c64

1 Like

My catalyst here is this N+1

1 Like