Getting down with Stackprof: how we added N+1 query detection to Scout

By Derek Bullet_white Posted in Development Bullet_white Comments Comments

Let's get the confusing part out of the way: we're going to get a little "meta". This post is about using one performance tool (Stackprof) to improve another performance tool (Scout's Rails Agent) so Scout can diagnose a common performance pitfall (N+1 queries).

Did I just put "performance" in a sentence three times? You can see I'm a little obsessed.

There's plenty written about why N+1 queries are bad. Is there anything good about an N+1?

Yes! Finding an N+1 is like finding a $20 bill in your couch. It's a performance-enhancing gift and often an easy fix - assuming you can find the spot in your code that is emitting the query.

...and there-in lies the problem. It is difficult to trace problematic N+1 queries on complex apps running in production back to a line-of-code. In fact, I don't know of a tool today you can run in production that does this. Why is it difficult? Grabbing backtraces is not cheap - you can't call Kernel#caller all willy-nilly in your instrumentation. It means you are left with deadends like this when trying to track down an N+1:

missing n+1

In the above screenshot, each ArDescriptor#find query executes quickly (22 ms), but there are 23(!) queries with the same SQL, adding up to nearly 500 ms.

Now, I don't know about you, but I find this incredibly frustrating. Armed with Stackprof, we set out to see: could we make it performant to find the source of N+1s with Scout?

Read More →

 

"Scout Does Things Right": Gigmit on using Scout

By Nick Bullet_white Comments Comments

Benjamin Knofe of Gigmit

Benjamin Knofe, CTO of Gigmit, sat down with us to share how they use Scout to improve their performance.

What is Gigmit?

Gigmit is a platform to connect music professionals to one another. Artists get opportunities to play gigs, shows, and festivals all over the world by showcasing their music and applying for gig listings created by promoters.

How big is your userbase?

We support 30,000 artists and 2,500 promoters world-wide. We also offer a suite of tools for all things involved in live event management: booking, merchandise, ticketing, and promotions.

Read More →

 

Monitor Sidekiq Jobs!

By Andre Bullet_white Comments Comments

Teaser for a soon-to-be released capability:

Overview metrics for all your background jobs

Chart throughput, latency, error rate, and more.

Detailed drill-down on slow jobs

See what's making the job slow, identify N+1 queries, and more.

Tech preview - want in?

Background job monitoring currently supports sidekiq, and is tech preview. Contact your account manager to enable it for your account.

 

3 Git Productivity Hacks

By Mark Bullet_white Posted in HowTo Bullet_white Comments Comments

Most Ruby developers use Git for their version control system of choice. Git is a wonderful tool that can save you countless hours of lost productivity and makes collaborating with others a cinch. Git's distributed nature also allows devs to work anywhere with or without an internet connection without fear of losing work.

With all of the power that Git provides also comes some complexity. Newcomers to Git may find it's syntax somewhat unintuitive and clunky at first. Even Git power users often have to lookup lesser known Git subcommands and options from time to time. Git is similar to a Swiss Army knife in that it contains many useful tools, but can take some time to master or even find a use for them all.

The goal of this post it to describe some lesser known features of Git and how you can leverage these to improve your Git workflow.

Let's get started.

Read More →

 

Now with Redis Instrumentation

By Derek Bullet_white Comments Comments

redis/

Among our customers, Redis is the single most popular database. It's a terrific compliment to any of the relational database systems out there, so it finds a way into a lot of apps.

We've added Redis instrumentation to our scout_apm gem - to upgrade:

bundle update scout_apm

PS - our background job monitoring tech preview begins soon. Ping support@scoutapp.com to join the preview.

 

Java for Rubyists

By Mark Bullet_white Comments Comments

The Scout Java Application Monitoring Agent is under active development and we have a few spots open in our alpha program. Email support@scoutapp.com for access.

For many Rubyists, Ruby is the first language that they learn and perhaps the only programming language that they know. Ruby provides an excellent gateway into the world of programming by allowing the newcomer to pick up its syntax rather quickly and allowing them to produce a working application within hours or even minutes using frameworks such as Rails.

Regardless of how one came to learn Ruby, I believe that programmers can benefit from learning another language that is fundamentally different, such as Java.

I'll provide a brief introduction into the world of Java from the perspective of a Rubyist. For the sake of staying focused, I'm not going to cover the difference in syntax between the two languages as this is best picked up over time, nor am I going to get into the details of more advanced Java topics such as the Java memory model or concurrency. What I do want to do is give a brief overview of the language, and why I think learning Java can benefit a Ruby programmer. Finally, I plan to cover some popular Java tools and frameworks and how they correspond to those in the Ruby world.

Read More →

 

Older posts: 1 2 3 ... 57