active-record-query-trace icon indicating copy to clipboard operation
active-record-query-trace copied to clipboard

not changing how logs are shown

Open DonGiulio opened this issue 2 years ago • 1 comments

Hello,

I'm trying to figure out an N+1 queries issue, but I can't figure out how to get this gem working for me, on rails 6.1.6.1

Nothing I do seems to change how activerecord queries are logged.

that is:

2022-08-10 08:35:18.536410 D [74:puma srv tp 004] (0.006ms) ActiveRecord -- Model Load -- { :sql => "SELECT ....", :binds => { .... }, :allocations => 1, :cached => true }

here's my configuration of the gem:

if Rails.env.development?
  ActiveRecordQueryTrace.enabled = true
  ActiveRecordQueryTrace.level = :full
  ActiveRecordQueryTrace.colorize = true
  # Optional: other gem config options go here
end

I added a byebug line here, and it's called a bunch of times at rails boot up time (Flipper gem loading the features) which are not logged at all. but then it's not called anymore.

Any ideas?

Thanks.

DonGiulio avatar Aug 10 '22 09:08 DonGiulio

Hi there,

Apologies for the late reply. I wish I could help you debug this but I currently don't have the bandwidth for it.

brunofacca avatar Sep 22 '22 19:09 brunofacca