foreman icon indicating copy to clipboard operation
foreman copied to clipboard

Fixes #36898 - Add rack-mini-profiler for profiling

Open m-bucher opened this issue 2 years ago • 6 comments

Packaging PR: https://github.com/theforeman/foreman-packaging/pull/9953

m-bucher avatar Nov 07 '23 17:11 m-bucher

Agreed, would it make sense to move the bullet-gem into the profiling-group as well?

m-bucher avatar Nov 24 '23 10:11 m-bucher

Possibly, but it's only enabled in development mode: https://github.com/theforeman/foreman/blob/8bd953dbdde34fd99ca3033905ebfa2b102b8fa6/config/environments/development.rb#L47-L56

So if you move it to profiling (which you also intend to be usable in production mode) the I'd expect it to setup to also happen in the production environment.

ekohl avatar Nov 24 '23 11:11 ekohl

I tried it, but the bullet.log could not be written in production due to missing permissions :-(

m-bucher avatar Nov 24 '23 14:11 m-bucher

That surprises me because https://github.com/flyerhzm/bullet#configuration states:

Bullet.bullet_logger: log to the Bullet log file (Rails.root/log/bullet.log)

in production Rails.root is /usr/share/foreman and /usr/share/foreman is a symlink to /var/log/foreman, which is owned by foreman. So it should be able to write there.

ekohl avatar Nov 24 '23 19:11 ekohl

Branching was already done some weeks ago. Can we continue with this?

sbernhard avatar Dec 28 '23 08:12 sbernhard