Configuration Options

The Ruby agent can be configured via the config/scout_apm.yml Yaml file and/or environment variables. A config file with your organization key is available for download as part of the install instructions.

Heroku users should use environment variables instead of the scout_apm.yml.

ERB evaluation

ERB is evaluated when loading the config file. For example, you can set the app name based on the hostname:

common: &defaults
  name: <%= " (#{Rails.env})" %>

Environment Variables

You can also configure Scout APM via environment variables. Environment variables override settings provided in scout_apm.yml. To configure Scout via enviroment variables, uppercase the config key and prefix it with SCOUT_. For example, to set the key via environment variables: export SCOUT_KEY=YOURKEY

Common Configurations

The following configuration settings are available:

Setting Name Description Default Required
name Name of the application (ex: ‘Photos App’). Rails.application.class.to_s. sub(/::Application$/, '') Yes
key The organization API key. Yes
monitor Whether monitoring should be enabled. false Yes
errors_enabled Whether Error Monitoring should be enabled. false No
auto_instruments Instrument custom code with AutoInstruments. false No
log_level The logging level of the agent. INFO No

Additional Configurations

Setting Name Description Default Required
dev_trace Indicates if DevTrace, the Scout development profiler, should be enabled. Note this setting only applies to the development environment. false No
detailed_middleware When true, the time spent in each middleware is visible in transaction traces vs. an aggregrate across all middlewares. This adds additional overhead and is disabled by default as middleware is an uncommon bottleneck. false No
hostname Allows renaming of the node/host name Socket.gethostname No
revision_sha The Git SHA that corresponds to the version of the app being deployed. See docs No
scm_subdirectory The relative path from the base of your Git repo to the directory which contains your application code. No
ignore An Array of web endpoints that Scout should not instrument. Routes that match the prefixed path (ex: ['/health', '/status']) will be ignored by the agent. [] No
enable_background_jobs Indicates if background jobs should be monitored. true No
collect_remote_ip Automatically capture end user IP addresses as part of each trace’s context. true No
auto_instruments_ignore Excludes the listed files names from being autoinstrumented. Ex: ['application_controller']. [] No
errors_ignored_exceptions Excludes certain exceptions from being reported [ActiveRecord::RecordNotFound, ActionController::RoutingError] No
errors_filtered_params Filtered parameters in exceptions [password, s3-key] No
log_file_path The path to the scout_apm.log log file directory. Use stdout to log to STDOUT. Environment#root+log/ or STDOUT if running on Heroku. No
proxy Specify the proxy URL (ex: https://proxy) if a proxy is required. No
host The protocol + domain where the agent should report. No
uri_reporting By default Scout reports the URL and filtered query parameters with transaction traces. Sensitive parameters in the URL will be redacted. To exclude query params entirely, use path. filtered_params No
disabled_instruments An Array of instruments that Scout should not install. Each Array element should should be a string-ified, case-sensitive class name (ex: ['Elasticsearch','HttpClient']). The default installed instruments can be viewed in the agent source. [] No
profile Indicates if ScoutProf, the Scout code profiler, should be enabled. true No
timeline_traces Send traces in both the summary and timeline formats. true No


It typically makes sense to treat each environment (production, staging, etc) as a separate application within Scout and ignore the development and test environments. Configure a unique app name for each environment as Scout aggregates data by the app name.


export SCOUT_NAME=YOURAPPNAME (Production)