❮ Back to FAQ

Ruby Troubleshooting

Why am I not seeing any data in Scout?

Work through these steps:

  1. Check if monitoring is enabled for your environment in the configuration

  2. Look for the log file at log/scout_apm.log. If it doesn’t exist, the gem wasn’t initialized. Ensure scout_apm isn’t restricted to a specific group in your Gemfile.

  3. Enable debug logging: Set log_level: debug in scout_apm.yml (or SCOUT_LOG_LEVEL=debug) and restart

  4. Verify the gem is deployed: Run bundle list scout_apm

  5. Confirm the config file exists at config/scout_apm.yml

  6. Restart the app and verify it’s processing requests

  7. Using Unicorn? Add preload_app true to your Unicorn config

If still not working, contact support@scoutapm.com with debug logs and your gem list.

Why do I see “StackLevelTooDeep” errors?

This occurs when multiple monitoring tools use different instrumentation methods (alias_method vs prepend). Two fixes:

  1. List scout_apm above the conflicting gem in your Gemfile:
gem 'scout_apm'
gem 'newrelic_rpm'  # Must be after scout_apm
  1. For agent versions 5.3.0+, set use_prepend: true in config, or SCOUT_USE_PREPEND=true for Heroku.

Why is there significant time in “Controller” or “Job”?

This indicates time outside Scout’s default instrumentation. Options:

  1. Custom Instrumentation: Use Scout’s API to instrument specific code sections
  2. Auto Instruments: Enable to automatically break down controller code (note: doesn’t instrument background jobs)

Why are memory metrics missing?

Memory allocation metrics require: - Ruby 2.1+ - scout_apm version 2.0+

Without these, Scout functions but doesn’t report allocation metrics.

Why aren’t certain errors being reported?

By default, Scout ignores ActiveRecord::RecordNotFound and ActionController::RoutingError. To collect these, set errors_ignored_exceptions to an empty array:

SCOUT_ERRORS_IGNORED_EXCEPTIONS=[]

Why is there a conflict with SimpleCov?

When Auto Instruments is enabled in test environments, conflicts with SimpleCov can occur. Disable Auto Instruments in the test environment via config or environment variables.

What overhead does Scout add?

Scout is built for production with minimal overhead. Two scenarios have higher overhead:

  1. detailed_middleware enabled: Instrumenting each middleware adds overhead. Keep disabled unless needed.

  2. Resque instrumentation: Since Resque forks child processes, Scout uses WEBrick to aggregate results. For ~18ms jobs, overhead is about 8%. Longer jobs have lower relative overhead.

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.