Scout Ruby Troubleshooting

No Data

Not seeing any data?

1

Is there a log/scout_apm.log file?

Yes:

Examine the log file for error messages:

tail -n1000 log/scout_apm.log | grep "Starting monitoring" -A20

See something noteworthy? Proceed to to the last step. Otherwise, continue to step 2.

No:

The gem was never initialized by the application.

Ensure that the scout_apm gem is not restricted to a specific group in your Gemfile. For example, the configuration below would prevent scout_apm from loading in a staging environment:

group :production do
  gem 'unicorn'
  gem 'scout_apm'
end

Jump to the last step if scout_apm is correctly configured in your Gemfile.

2

Was the scout_apm gem deployed with your application?

bundle list scout_apm
3

Did you download the config file, placing it in config/scout_apm.yml?

4

Did you restart the app?

5

Are you sure the application has processed any requests?

tail -n1000 log/production.log | grep "Processing"
6

Using Unicorn?

Add the preload_app true directive to your Unicorn config file. Read more in the Unicorn docs.

7

Oops! Looks like messed up. Check out the GitHub issues and send us an email with the following:

  • The last 1000 lines of your log/scout_apm.log file, if the file exists:
    tail -n1000 log/scout_apm.log.
  • Your application's gems bundle list.
  • Rails version
  • Application Server (examples: Passenger, Thin, etc.)
  • Web Server (examples: Apache, Nginx, etc.)

We typically respond within a couple of hours during the business day.

Significant time spent in “Controller” or “Job”

When viewing a transaction trace, you may see time spent in the “controller” or “job” layers. This is time that falls outside of Scout’s default instrumentation. There are two options for gathering additional instrumentation:

  1. Custom Instrumentation - use our API to instrument pieces of code that are potential bottlenecks.
  2. ScoutProf - install our BETA agent which adds ScoutProf. ScoutProf breaks down time spent within the controller layer. Note that ScoutProf does not instrument background jobs.

Missing memory metrics

Memory allocation metrics require the following:

  • Ruby version 2.1+
  • scout_apm version 2.0+

If the above requirements are not met, Scout continues to function but does not report allocation-related metrics.