Ruby Setup
How do I install Scout APM for Ruby on Rails?
Installation takes three steps:
- Add the gem to your Gemfile:
gem 'scout_apm'- Run bundle install:
bundle install- Download your customized config file from the Scout UI and place it at
config/scout_apm.yml, then deploy.
Data typically appears in the Scout UI within five minutes of deployment.
How do I use Scout APM locally in development?
Follow the same installation steps, but set monitor: true under the development environment in your config/scout_apm.yml. Consider using a different app name to keep development data separate:
development:
<<: *defaults
monitor: true
name: My App (development)How do I configure Scout on Heroku?
Heroku users should configure Scout via environment variables instead of the yaml config file:
heroku config:set SCOUT_KEY='your_key'
heroku config:set SCOUT_NAME='My Heroku App'
heroku config:set SCOUT_MONITOR=trueIf you install Scout via the Heroku Add-on, SCOUT_MONITOR and SCOUT_KEY are set automatically during provisioning.
Does Scout work with Docker?
Yes. Scout runs within Docker containers without special configuration. Use environment variables for configuration instead of the yaml config file.
How do I configure Scout on Cloud Foundry?
Scout works on Cloud Foundry. Recommended configuration:
common: &defaults
key: YOUR_KEY
monitor: true
name: <%= ENV['VCAP_APPLICATION'] ? JSON.parse(ENV['VCAP_APPLICATION'])['application_name'] : "YOUR APP NAME" %>
log_file_path: STDOUT
hostname: <%= ENV['VCAP_APPLICATION'] ? "#{JSON.parse(ENV['VCAP_APPLICATION'])['application_name']}.#{ENV['CF_INSTANCE_INDEX']}" : Socket.gethostname %>This sends logs to Loggregator and uses meaningful hostname identifiers.