Scout APM is an Application Performance Monitoring (APM) agent for Python that provides detailed performance metrics and transaction traces for web applications (Django, Flask, FastAPI, etc.) and background jobs (Celery, RQ). It helps identify performance bottlenecks, monitor errors, manage logs, and track external services. The current stable version is 3.5.3, with regular updates to support new Python versions and frameworks.
pip install scout-apmVerified import paths — ran on the pinned version, not inferred.
The quickstart demonstrates global configuration via `scout_apm.api.Config.set()` and agent installation via `scout_apm.api.install()`. It also includes an example of custom instrumentation using `WebTransaction` and `instrument` for non-framework specific code. In production, `SCOUT_KEY`, `SCOUT_NAME`, and `SCOUT_MONITOR` are commonly set via environment variables.
Upgrade your Python environment to 3.8 or newer. If stuck on legacy Python, pin `scout-apm` to version `<=2.26.1`.
Use a limited set of descriptive transaction names. For high-dimensionality data, add it as context to the transaction instead of making it part of the transaction name. Example: `api.Context.set(user_id=user.id)`.
Use the new configuration names (`core_agent_log_level`, `core_agent_config_file`, `ignored_endpoints`). Old names might still work as aliases but are not recommended for new configurations.
1. Verify `SCOUT_KEY` and `SCOUT_NAME` are correct. 2. Ensure `SCOUT_MONITOR` is set to `True` (or 'true' via env var). 3. Enable debug logging (`logging.getLogger("scout_apm").setLevel(logging.DEBUG)`) and check logs for errors or connection issues. 4. Ensure `install()` is called at application startup. 5. Confirm your Python version is 3.8+.For Django applications, add `'scout_apm.django'` to the `INSTALLED_APPS` list in your `settings.py` file. No direct import statement for `scout_apm.django` is typically needed in your code.
No dependency data recorded yet.