igorkasyanchuk / rails_performance

Monitor performance of you Rails applications (self-hosted and free)
https://www.railsjazz.com/
MIT License
957 stars 54 forks source link

rake tasks causing errors when redis is not available even when RailsPerformance.setup config has `enabled = false` #32

Closed carlost closed 3 years ago

carlost commented 3 years ago

app uses:

App has disabled RailsPerformance in initialization file but still includes it as dependency in Gemfile scope.

What i originally posted as the cause of the issue was wrong ... because i was talking about RailsPerformance code that I added to the gem while debugging this :)

The rake task extension never checks to see if RailsPerformance is enable ... so it will always run and capture data.

This should respect the apps config settings.

carlost commented 3 years ago

I am not sure what a clean solution to this might be. We don't need to instrument our rake tasks, so we just monkey patched Rake::Task to remove the RailsPerformance instrumentation. If we needed to instrument rarke I think our solution would have been to:

igorkasyanchuk commented 3 years ago

@carlost can you prepare a PR?

hmontazeri commented 3 years ago

same issue here 😢

In my case CI fails as asset precompile loads the app.

haffla commented 3 years ago

Didn't I fix that in https://github.com/igorkasyanchuk/rails_performance/pull/30?

@igorkasyanchuk could you create a new release that includes it?

igorkasyanchuk commented 3 years ago

sorry for a delay, new version rails_performance-1.0.1.gem just released thanks!