scout_apm_ruby icon indicating copy to clipboard operation
scout_apm_ruby copied to clipboard

Sequel support

Open gencer opened this issue 7 years ago • 15 comments

Maybe we can examine queries executed by Sequel? RackMini supports Sequel and easily handle it. Maybe you can see the source code and adapt to ScoutApp?

After I GoLive, In production, I would like and love to see how much costs on Sequel operations by using Scout. Otherwise, I just not gonna see it and do not know how much time spent or which query is slow by looking to, ehrm, nothing.

gencer avatar May 29 '17 15:05 gencer

I would like to see this

matthewford avatar Feb 01 '19 22:02 matthewford

Rather than "Sequel" or "ActiveRecord", why not just instrument the underling SQL libraries? Then it will work with everything.

ioquatix avatar Feb 02 '19 07:02 ioquatix

@ioquatix Pretty sure Sequel is the underlying library though 🤔

matthewford avatar Feb 02 '19 14:02 matthewford

Doesn't it use the pg, mysql2 or related gem for actually sending queries to the database?

ioquatix avatar Feb 02 '19 20:02 ioquatix

@ioquatix yes it does.

gencer avatar Feb 04 '19 05:02 gencer

I guess the challenge is if we instrument the raw query, you might have trouble putting it back in the context of the higher level operation, e.g. joins, transactions, includes, etc.

ioquatix avatar Feb 04 '19 05:02 ioquatix

I agree. However, At least a basic support for Sequel should be in. Currently, the only reason I do not use DevTrace is that I cannot see how long it takes my queries. RackMini, S**light and Peek can see my queries ans show it to me. If they can do, Why not Scout?

Especially giving credit to DevTrace being an awesome development tool both as a profiling and UI. I personally hate RackMini because it is so ugly.

At least, Instrumenting RAW Queries is a start.

gencer avatar Feb 04 '19 05:02 gencer

Perhaps we could use Skylight's sequel probe as a jumping off point?

Edit: Link removed to protect developers from weird license restrictions.

alecgorge avatar Feb 07 '19 01:02 alecgorge

Sorry, but we can't use or look at Skylight's code due to licensing.

cschneid avatar Feb 07 '19 04:02 cschneid

I will be looking at Sequel support soon though, I think basic instrumentation shouldn't be too hard.

cschneid avatar Feb 07 '19 04:02 cschneid

@cschneid, any news on this?

gencer avatar Mar 08 '19 09:03 gencer

I've started looking at Sequel, but haven't formalized it into a proper instrument yet. I'll see if I can find time this week to get it released.

cschneid avatar Mar 11 '19 17:03 cschneid

@cschneid Thank you! I will be very happy to test your branch/PR and give feedback about it. Just ping me here if you need anything.

gencer avatar Mar 11 '19 17:03 gencer

Really looking forward to this. As a bonus, ROM-RB also uses Sequel as its underlying databasing library, so that whole emerging ecosystem might also get supported automatically!

soumyaray avatar May 09 '19 23:05 soumyaray

@cschneid Any progress?

gencer avatar Sep 28 '19 17:09 gencer