MiniProfiler / rack-mini-profiler

Profiler for your development and production Ruby rack apps.
MIT License
3.69k stars 401 forks source link

Cannot see all requests in development #540

Closed raquelhortab closed 1 year ago

raquelhortab commented 1 year ago

The profiler does not seem to work equally in production than in development. A request in production: Selection_767

The same request in dev: Selection_768 Selection_769

I think it might be because in dev, any request is tracked but there might be some maximum of requests shown (it says x10 but only shows 9. Meanwhile, in production only the main page request is tracked (since it is where I'm calling Rack::MiniProfiler.authorize_request).

Is there any way I can see all requests when unfolding the profiler info?

raquelhortab commented 1 year ago

I have modified the maxTracesToShow value in profiler.rb although it'd be nice if this was customizable via some config file or initialization options

gmcgibbon commented 1 year ago

In the latest release, this is configurable via Rack::MiniProfiler.config.max_traces_to_show = <some number>. The default value is 20, but you should be able to change it in an initializer or equivalent. See https://github.com/MiniProfiler/rack-mini-profiler/blob/edbcad3197a1a9db9260b502296cc697f12f1520/lib/mini_profiler/profiler.rb#L754

nate-at-gusto commented 1 year ago

One big reason for the difference is usually asset requests. You didn't post what the other URLs are, but I'm guessing since they're so quick is because you are serving your assets from your Rails server when on local, and you're not ignoring those paths in your configuration.