❮ Back to FAQ

Python Configuration

How can I configure Scout for Python?

Scout can be configured via three methods:

  1. Scout Config API:
from scout_apm.api import Config
Config.set(
    key="YOUR_KEY",
    name="My App",
    monitor=True,
)
  1. Framework settings (e.g., Django’s settings.py or Flask’s app.config)

  2. Environment variables: Uppercase the key and prefix with SCOUT_ (e.g., SCOUT_KEY, SCOUT_NAME)

What are the required configuration settings?

SettingDescription
keyYour organization API key from Scout UI
nameApplication name (e.g., “Photos App”)
monitorSet to True to enable monitoring

How do I configure different environments?

Use unique app names for each environment to keep data separate:

export SCOUT_KEY=yourkey
export SCOUT_NAME="My App (Production)"

For staging: SCOUT_NAME="My App (Staging)"

How do I ignore certain URL paths?

Use the ignore configuration option:

Config.set(
    ignore=["/health-check/", "/admin/"],
)

Or via environment variable:

export SCOUT_IGNORE='/health-check/,/admin/'

What Core Agent configurations are available?

The Core Agent handles data transmission. Key options include:

SettingDescriptionDefault
core_agent_dirDirectory for Core Agent/tmp/scout_apm_core
core_agent_downloadAuto-download Core AgentTrue
core_agent_launchAuto-start Core AgentTrue
core_agent_log_levelLog level (trace, debug, info, warn, error)info
core_agent_socket_pathSocket path for connectiontcp://127.0.0.1:6590

How do I enable debug logging?

For debugging, you can: - Set core_agent_log_level to debug or trace - Set log_payload_content to True to log payloads sent to the core agent

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.