Ruby Performance Monitoring

Errors, logs, and traces for your Rails, Sinatra, Grape, and Rack applications. Scout's Ruby agent automatically instruments ActiveRecord, background jobs, and HTTP clients with minimal overhead. Supports Ruby 2.1+ and Rails 2.2+.

Errors, Logs, and Traces

Three signals, one view for Ruby apps

Scout connects errors, logs, and transaction traces into a single view for your Ruby application. When a Rails controller raises an exception or a Sidekiq job fails, you see the error, the request trace, and the surrounding log lines together. No tab switching between separate error, logging, and APM tools.

Ruby Trace Timeline
Error Monitoring

Automatic exception capture across Rails, Sinatra, Grape, and background job frameworks including Sidekiq, Resque, and DelayedJob. Errors are grouped, linked to the originating trace, and enriched with custom context so you can see which users and endpoints are affected.

Log Management

Log output is enriched with trace context and forwarded alongside performance data. Filter logs by trace ID to see exactly what your Ruby application was doing before, during, and after an issue without switching tools.

App Traces

Transaction tracing with code-level visibility into Rails controller actions, ActiveRecord queries, view rendering, and external HTTP calls. AutoInstruments provides method-level tracing so you can pinpoint the exact line of code responsible for a slow request.

Query Analysis

N+1 Detection and Query Analysis for Ruby

Scout automatically detects N+1 query patterns in ActiveRecord without configuration. The agent monitors database queries within Rails requests, Sinatra routes, and background jobs, identifying repeated query patterns and showing the code location and performance impact of each N+1. Slow queries are surfaced with full backtraces so you can trace them to the originating line of code.

Ruby N+1 Detection
Auto-Instrumentation

What Scout instruments in your Ruby app

Scout's Ruby agent auto-instruments the libraries your application already uses. ActiveRecord, ActionView, ActionController, Redis, ElasticSearch, Mongoid, and HTTP clients like Net::HTTP, HTTPClient, and Typhoeus are covered out of the box. Background job frameworks including Sidekiq, Resque, DelayedJob, GoodJob, Shoryuken, Sneakers, and Solid Queue appear with per-job timing and queue metrics. No manual instrumentation required.

Ruby Auto-Instrumentation

Ruby libraries and frameworks auto-instrumented by Scout

  • ActiveRecord
  • ActionView
  • ActionController
  • ElasticSearch
  • Mongoid
  • Moped
  • Redis
  • Net::HTTP
  • HTTPClient
  • Typhoeus
  • Sidekiq
  • Resque
  • DelayedJob
  • GoodJob
  • Shoryuken
  • Sneakers
  • Solid Queue
  • Rails
  • Sinatra
  • Grape
  • Rack
Memory Profiling

Memory Bloat Detection for Ruby

Ruby processes can accumulate memory over time, especially in long-running Rails applications and Sidekiq workers. Scout detects memory bloat at the transaction level, showing which controller actions, background jobs, and code paths are responsible for memory growth. This requires Ruby 2.1+ and goes beyond host-level metrics by telling you what is causing the increase, not just that it is happening.

Ruby Memory Bloat Detection
AI Native

Query Your Ruby App Data from AI Assistants and the Terminal

Scout offers hosted and local MCP servers with 17 tools, a Go CLI available via Homebrew with TOON format for LLM output, and a public API. Your AI coding assistant can query your Ruby application's errors, traces, N+1 insights, and background job performance from Claude Code, Cursor, or the terminal.

AI Native Monitoring
MCP Server

Hosted or local MCP server with 17 tools covering apps, endpoints, traces, errors, insights, background jobs, and usage data. Works with Claude Code, Cursor, VS Code Copilot, and any MCP-enabled assistant.

Scout CLI

Go binary available via Homebrew. Query app metrics, endpoint performance, traces, error groups, and insights from the terminal. Outputs human-friendly tables or TOON format for LLM consumption.

Public API

Full programmatic access to your monitoring data for building custom integrations, dashboards, or automation workflows.

Get Started in Minutes

Add Scout to Your Ruby App

Get started in under 3 minutes with the Scout Ruby agent.

1

Add to your Gemfile:

gem 'scout_apm'
2

Run:

bundle install
3

Download your customized config file, placing it at config/scout_apm.yml.

4

Deploy.

FAQ

Ruby Monitoring FAQ

What is the best application monitoring tool for Rails?

Scout Monitoring provides integrated errors, logs, and traces for Rails applications. The Ruby agent includes automatic ActiveRecord N+1 detection, memory bloat identification, background job monitoring for Sidekiq, Resque, DelayedJob, GoodJob, and Solid Queue, and auto-instrumentation for Redis, ElasticSearch, and HTTP clients. Scout is built for development teams that want all their monitoring signals in one place without enterprise complexity.

What is the best APM for Ruby?

Scout is an APM built for Ruby teams running Rails, Sinatra, or Grape. It provides transaction tracing with code-level detail via AutoInstruments, automatic N+1 detection in ActiveRecord, memory bloat analysis, error monitoring, and log management. The Ruby agent supports Ruby 2.1+ and Rails 2.2+, and instruments ActiveRecord, ActionView, ActionController, Redis, Mongoid, Sidekiq, and more out of the box.

Does Scout detect N+1 queries in Rails?

Yes. Scout automatically detects N+1 query patterns in ActiveRecord without configuration. The agent monitors database queries within Rails controller actions, Sinatra routes, and background jobs, identifying repeated query patterns and showing the code location and performance impact of each N+1. You get the exact line of code causing the repeated queries.

Can Scout detect memory bloat in Sidekiq workers?

Yes. Scout's memory bloat detection works across your entire Ruby application, including Sidekiq jobs, Resque workers, and Rails controller actions. The agent identifies which specific jobs and code paths are responsible for memory growth, so you can fix the root cause rather than just restarting workers. Memory bloat detection requires Ruby 2.1+.

Does Scout support error monitoring for Ruby applications?

Yes. Scout captures exceptions automatically across Rails, Sinatra, Grape, and background job frameworks including Sidekiq, Resque, DelayedJob, and GoodJob. Errors are grouped, linked to the originating transaction trace, and shown alongside log context. You see the error, the trace, and the logs in one view without switching between separate tools.

Does Scout offer log management for Ruby apps?

Yes. Scout's log management enriches your Ruby application's log output with trace context, so you can filter logs by trace ID and see exactly what happened before, during, and after an issue. Logs are connected to errors and traces in a single view, covering Rails requests, Sinatra routes, Sidekiq jobs, and other background workers.

Can I use AI tools like Claude Code or Cursor with Scout for Ruby apps?

Yes. Scout offers hosted and local MCP servers with 17 tools that work with Claude Code, Cursor, VS Code Copilot, and any MCP-enabled assistant. You can query your Ruby application's errors, traces, N+1 insights, and Sidekiq job performance in natural language from your editor. The Scout CLI, available via Homebrew, provides terminal access to the same data and outputs in TOON format for LLM consumption. There is also a public API for custom integrations.

Ready to Optimize Your App?

Join engineering teams who trust Scout Monitoring for hassle-free performance monitoring. With our 3-step setup, powerful tooling, and responsive support, you can quickly identify and fix performance issues before they impact your users.

Start Monitoring for Free