diff --git a/config/initializers/mini_profiler.rb b/config/initializers/mini_profiler.rb index 8872cf0170c..d12d5d4c533 100644 --- a/config/initializers/mini_profiler.rb +++ b/config/initializers/mini_profiler.rb @@ -15,6 +15,11 @@ if defined?(Rack::MiniProfiler) (env['PATH_INFO'] !~ /commits-widget/) end + Rack::MiniProfiler.config.user_provider = lambda do |env| + user = CurrentUser.lookup_from_env(env) + user ? user.id.to_s : Rack::Request.new(env).ip + end + Rack::MiniProfiler.config.position = 'left' Rack::MiniProfiler.config.backtrace_ignores ||= [] Rack::MiniProfiler.config.backtrace_ignores << /lib\/rack\/message_bus.rb/