Adding Sidekiq Job Context to ActiveRecord Query Log Tags

Anyone that has worked with Rails for any significant amount of time probably knows that Rails performance tends to be tightly coupled to database query performance. For this reason, it’s extremely valuable to make friends with your local slow query log, where you can identify the queries that are taking the longest and in need of tuning. So, once you’ve identified your slow query(ies), it’s time to get tuning, right? Not so fast. First you need to find out where in the code this query is being generated. If you’re doing things the Rails way and using ActiveRecord to generate these queries, that can be pretty tough since you can’t just grep the code to find that query.
Adding Sidekiq Job Context to ActiveRecord Query Log Tags #ruby #rubydeveloper #rubyonrails #activerecord #sidekiq https://rubyonrails.ba/single/adding-sidekiq-job-context-to-activerecord-query-log-tags

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles