Python Agent
Looking for detailed tracing to support your microservices architecture? Check out our sister app, TelemetryHub.
Scout APM
Scout’s Python agent supports many popular libraries to instrument SQL queries, template rendering, HTTP requests and more.
The package is called scout-apm
on PyPI.
Source code and issues can be found on our scout_apm_python GitHub repository.
Requirements
scout-apm
requires :
- Python 3.8+
- A POSIX operating system, such as Linux or macOS (Request Windows support).
Instrumented Libraries
Scout provides instrument for most of the popular Python libraries. Instrumentation may require some configuration (Django
) or is automatically applied (Requests
) by our agent.
Some configuration required
The libraries below require a small number of configuration updates. Click on the respective library for instructions.
- Bottle
- Celery
- Dash
- Django
- Dramatiq
- Falcon
- FastAPI
- Flask
- Flask SQLAlchemy
- Huey
- Hug
- RQ
- SQLAlchemy
- Starlette
Additionally, Scout can also instrument request queuing time.
Automatically applied
The libraries below are automatically detected by the agent during the startup process and do not require explicit configuration to add instrumentation.
- ElasticSearch
- Jinja2
- PyMongo
- Redis
- UrlLib3 (used by the popular Requests)
Deprecated support
The following libraries were instrumented in previous version of the scout_apm
package, but are no longer supported. You can instrument these yourself or pin an earlier version of the agent. (scout-apm=2.26.1
).
This version of scout-apm also supports legacy Python versions including 2.7 and < 3.8
You can instrument your own code or other libraries via custom instrumentation. You can suggest additional libraries you’d like Scout to instrument on GitHub.
Below are database drivers that SQLAlchemy and Django integrate with that we support:
- SQLAlchemy
- SQLite
- pysqlite
- asiosqlite
- pysqlcipher
- PostgreSQL
- psycopg2
- pg8000
- asyncpg
- psycopg2cffi
- py-postgresql
- pygresql
- MySQL / MariaDB
- mysqlclient
- PyMySQL
- MySQL Python Connector
- aiomysql
- CyMySQL
- OurSQL
- PyODBC
- Oracle
- cx-Oracle
- PyODBC
- mxODBC
- pymssql
- Django
- SQLite
- PostgreSQL
- psycopg2
- MySQL / MariaDB
- mysqlclient
- MySQL Python Connector
- Oracle
- cx-Oracle
- MS SQL
- django-mssql-backend
- Cockroach DB
- django-cockroachdb
- Firebird
- django-firebird
- MongoDB
- djongo (edited)
Updating to the Newest Version
pip install scout-apm --upgrade
The package changelog is available here.