Configuration Options

The PHP agent can be configured via either environment variables or code.

Environment Variables

You can also configure Scout APM via environment variables. To configure Scout via enviroment variables, uppercase the config key and prefix it with SCOUT_. For example, to set the key configuration via environment variables use: export SCOUT_KEY=YOURKEY

Code based

Scout APM variables can also be set via code:

For Laravel, you can use a skeleton configuration file

For Symfony, you can configure Scout in your config/packages/scoutapm.xml file

Common Configurations

Setting Name Description Default Required
key The organization API key. Yes
name Name of the application (ex: ‘Photos App’). Yes
monitor Whether monitoring data should be reported. false Yes
log_level Override the SCOUT log level. Can only be used to quiet the agent, will not override the underlying logger’s level "info" No

Additional Configurations

Setting Name Description Default Required
revision_sha The Git SHA associated with this release. 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_endpoints A string containing a JSON array of endpoints that Scout should ignore. [] No
disabled_instruments A string containing a JSON array of instruments that Scout should not install. [] No
hostname The hostname the metrics should be aggregrated under. hostname No

Core Agent Configurations

Setting Name Description Default Required
core_agent_dir Path to create the directory which will store the Core Agent. /tmp/scout_apm_core No
core_agent_download Whether to download the Core Agent automatically, if needed. True No
core_agent_launch Whether to start the Core Agent automatically, if needed. True No
core_agent_permissions The permission bits to set when creating the directory of the Core Agent. 700 No
core_agent_full_name The release/url we look for when downloading the core-agent. Auto-detected No
core_agent_triple If you are running a MUSL based Linux (such as ArchLinux), you may need to explicitly specify the platform triple. E.g. x86_64-unknown-linux-musl Auto detected No
core_agent_log_level The log level of the core agent process. This should be one of: "trace", "debug", "info", "warn", "error". This does not affect the log level of the PHP library. To change that, directly configure logging as per the documentation. "info" No
core_agent_log_file The log file for the core agent process "info" 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)