3

Is there any way of seeing Bullet logs while the work is processed in Sidekiq worker? When I perform N+1 query in Sidekiq worker (through ActiveJob queue adapter) I don't see the usual Bullet log in neither the Rails console nor the Sidekiq console.

Martin Svoboda
  • 297
  • 1
  • 4
  • 18

1 Answers1

0

As they explain in the docs, you can use Bullet.profile:

class ApplicationJob < ActiveJob::Base
  around_perform do |_job, block|
    Bullet.profile do
      block.call
    end
  end
end
gonzaloriestra
  • 713
  • 6
  • 15