Jonah Jonah - 3 months ago 6x
Ruby Question

Rack::MiniProfiler not capturing Sequel queries in Sinatra app

I am trying to profile the queries in my Sinatra app, which uses the Sequel ORM and MySql, through the mysql2 adapter. I'm using Rack::MiniProfiler, and the profiler seems to be working except it is not showing any queries, even though there are many of them being run on the page in question.

To use miniprofiler, all I have done is

require 'rack-mini-profiler'
use Rack::MiniProfiler

Am I missing some needed configuration to ensure the Sequel queries are picked up?

Here's a screenshot of miniprofiler's output:

enter image description here

If this cannot be made to work, I am also open to other suggestions to solve the query profiling problem, though I have tried Rack::Bug as well, and it too failed to pick up the Sequel queries.


Make sure to require 'sequel' before require 'rack-mini-profiler'.