Rails Performance Monitoring
Errors, logs, and traces for your Rails applications. Scout's Ruby agent automatically detects N+1 queries in ActiveRecord, catches memory bloat in Puma workers and Sidekiq jobs, and connects exceptions to the exact request trace that caused them. Supports Rails 2.2+ and Ruby 2.1+.
Errors, Logs, and Traces in One View for Rails Apps
Scout combines error monitoring, log management, and transaction tracing into a single view for your Rails application. When a controller action raises an exception or a Sidekiq job fails, you see the error, the full request trace, and the surrounding log lines together. No switching between Sentry, your log tool, and your APM.
Error Monitoring
Automatic exception capture across Rails controllers, ActiveRecord callbacks, and background job frameworks including Sidekiq, Resque, GoodJob, DelayedJob, and Solid Queue. Errors are grouped, linked to the originating trace, and enriched with custom context so you 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 Rails application was doing before, during, and after an issue. Works with Rails request logs, Sidekiq job logs, and background workers.
App Traces
Transaction tracing with code-level visibility into Rails controller actions, ActiveRecord queries, ActionView rendering, ActionMailer delivery, and external HTTP calls. AutoInstruments provides method-level tracing so you can pinpoint the exact line of code responsible for a slow request.
N+1 Detection in ActiveRecord, Automatically
Scout automatically detects N+1 query patterns in ActiveRecord without configuration. The agent monitors database queries within Rails controller actions, ActiveJob and Sidekiq background jobs, and API endpoints, then identifies repeated query patterns with the exact code location and total performance impact. You get the line causing the N+1, not just a slow query log.
ActiveRecord, Sidekiq, Redis, and More Out of the Box
Scout auto-instruments the libraries your Rails application already uses. ActionController, ActionView, and ActiveRecord are covered at the framework level. Background job frameworks including Sidekiq, Resque, GoodJob, Solid Queue, DelayedJob, Shoryuken, and Sneakers appear with per-job timing and queue metrics. Redis, ElasticSearch, Mongoid, Moped, and HTTP clients including Net::HTTP, HTTPClient, and Typhoeus are instrumented automatically. No manual spans or wrapper modules required.
Works with the Rails frameworks you already use
Scout auto-instruments the frameworks and libraries in your stack. No manual configuration required.
Rails Framework
- ActionController
- ActionView
- ActiveRecord
Background Jobs
- Sidekiq
- Resque
- GoodJob
- Solid Queue
- Delayed::Job
- Shoryuken
- Sneakers
Databases
- ActiveRecord
- PostgreSQL
- MySQL
- SQLite
- MongoDB
- Elasticsearch
- Redis
HTTP Clients
- Net::HTTP
- HTTPClient
- Typhoeus
Memory Bloat Detection for Rails and Sidekiq
Rails applications and Sidekiq workers can accumulate memory over time. Scout detects memory bloat at the transaction level, showing which controller actions, background jobs, and code paths are responsible for memory growth in your Rails app. 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.
Query Your Rails 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 Rails application's errors, traces, ActiveRecord N+1 insights, and Sidekiq job performance from Claude Code, Cursor, or the terminal.
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.
Add Scout to Your Rails App
Get Scout running on your Rails app in under 3 minutes.
Add to your Gemfile:
gem 'scout_apm'Run:
bundle installDownload your customized config file, placing it at config/scout_apm.yml.
Deploy.
Rails Monitoring FAQ
What is the best 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 at the transaction level, Sidekiq and background job monitoring, and auto-instrumentation for Redis, Elasticsearch, and HTTP clients. Scout is built for Rails teams that want all their monitoring signals in one place without enterprise complexity.
What is the best APM for Rails?
Scout is an APM built specifically for Rails teams. It provides transaction tracing with code-level detail via AutoInstruments, automatic N+1 detection in ActiveRecord, memory bloat analysis across controller actions and Sidekiq jobs, error monitoring, and log management. The agent supports Rails 2.2+ and Ruby 2.1+, and instruments ActionController, ActionView, ActionMailer, ActiveRecord, Sidekiq, Redis, and more out of the box. Setup takes under 3 minutes.
How do I detect N+1 queries in Rails?
Scout automatically detects N+1 query patterns in ActiveRecord without any configuration. The agent monitors database queries within Rails controller actions, ActiveJob tasks, and Sidekiq background jobs, identifies repeated query patterns, and shows the exact code location and performance impact of each N+1. You get the line responsible for the repeated queries, not just a list of slow queries.
How do I monitor Sidekiq jobs with Scout?
Scout auto-instruments Sidekiq out of the box with per-job execution timing, queue depth, error rates, and memory bloat detection. Each Sidekiq job appears as its own transaction in Scout with full trace detail, including any ActiveRecord queries, Redis calls, and HTTP requests made during the job. Resque, GoodJob, Solid Queue, DelayedJob, Shoryuken, and Sneakers are also supported.
How do I find memory leaks in a Rails app?
Scout detects memory bloat at the transaction level in your Rails application. The agent identifies which specific controller actions, Sidekiq jobs, and code paths are responsible for memory growth, so you can fix the root cause rather than just restarting your Puma or Sidekiq workers. Memory bloat detection requires Ruby 2.1+.
Does Scout support error monitoring for Rails?
Yes. Scout captures exceptions automatically across Rails controllers, ActiveRecord callbacks, and background job frameworks including Sidekiq, Resque, GoodJob, and DelayedJob. Errors are grouped, linked to the originating transaction trace, and shown alongside log context. You see the error, the trace, and the surrounding log lines in one view.
Does Scout support log management for Rails apps?
Yes. Scout enriches your Rails application 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, Sidekiq jobs, and background workers.
How does Scout compare to New Relic and Datadog for Rails?
Scout is built for Rails teams who want to fix problems, not configure an observability platform. New Relic and Datadog are powerful but heavy and designed for operations teams managing large infrastructure. Scout is opinionated for Ruby and Rails, includes automatic ActiveRecord N+1 detection without configuration, and starts at $19 per month. If you want an APM that understands Rails rather than one that treats it as a generic HTTP service, Scout is the better fit.
Can I use Scout with Claude Code or Cursor for Rails debugging?
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 Rails application's errors, traces, ActiveRecord N+1 insights, and Sidekiq job performance in natural language from your editor. The Scout CLI, available via Homebrew, gives you terminal access to the same data in TOON format for LLM consumption. There is also a public API for custom integrations.
How much overhead does Scout add to a Rails app?
Overhead is typically under 1% in production Rails applications. The agent samples expensive operations and uses background threads for data transmission so it does not block requests. Scout instruments Rails at the framework level rather than monkey-patching individual methods, which keeps the footprint small.