Scout Application Performance Monitoring Agent
Project description
Scout Python APM Agent
Monitor the performance of Python Django apps, Flask apps, and Celery workers with Scout's Python APM Agent. Detailed performance metrics and transaction traces are collected once the scout-apm
package is installed and configured.
Requirements
Python Versions:
- Python 3.4+
- Python 2.7
Scout APM works with the following frameworks:
- Django 1.8+
- Falcon 2.0+
- Flask 0.10+
- Celery 3.1+
- Pyramid 1.8+
- Bottle 0.12+
For frameworks not listed above, you can use the agent's instrumentation API. See the Python help docs for more information.
Quick Start
A Scout account is required. Signup for Scout.
pip install scout-apm
Bottle
from scout_apm.bottle import ScoutPlugin
app = bottle.default_app()
app.config.update({
"scout.name": "YOUR_APP_NAME",
"scout.key": "YOUR_KEY",
"scout.monitor": "true",
})
scout = ScoutPlugin()
bottle.install(scout)
Django
# settings.py
INSTALLED_APPS = [
"scout_apm.django", # should be listed first
# ... other apps ...
]
# Scout settings
SCOUT_MONITOR = True
SCOUT_KEY = "[AVAILABLE IN THE SCOUT UI]"
SCOUT_NAME = "A FRIENDLY NAME FOR YOUR APP"
Falcon
import falcon
from scout_apm.falcon import ScoutMiddleware
scout_middleware = ScoutMiddleware(config={
"key": "[AVAILABLE IN THE SCOUT UI]",
"monitor": True,
"name": "A FRIENDLY NAME FOR YOUR APP",
})
api = falcon.API(middleware=[ScoutMiddleware()])
# Required for accessing extra per-request information
scout_middleware.set_api(api)
Flask
These instructions assume the app uses SQLAlchemy
. If that isn't the case, remove the referencing lines.
from scout_apm.flask import ScoutApm
from scout_apm.flask.sqlalchemy import instrument_sqlalchemy
# Setup a flask 'app' as normal
# Attach ScoutApm to the Flask App
ScoutApm(app)
# Instrument the SQLAlchemy handle
instrument_sqlalchemy(db)
# Scout settings
app.config["SCOUT_MONITOR"] = True
app.config["SCOUT_KEY"] = "[AVAILABLE IN THE SCOUT UI]"
app.config["SCOUT_NAME"] = "A FRIENDLY NAME FOR YOUR APP"
Pyramid
Add the SCOUT_*
settings to the Pyramid config, and then config.include('scout_apm.pyramid')
import scout_apm.pyramid
if __name__ == "__main__":
with Configurator() as config:
config.add_settings(
SCOUT_KEY="...",
SCOUT_MONITOR=True,
SCOUT_NAME="My Pyramid App"
)
config.include("scout_apm.pyramid")
# Rest of your config...
For full installation instructions, including information on configuring Scout via environment variables, see our Python docs.
Documentation
For full installation and troubleshooting documentation, visit our help site.
Support
Please contact us at support@scoutapm.com or create an issue in this repo.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for scout_apm-2.1.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86a5c31cb4eb97a41cd287837cccbc53adf9b99b97219a333bd40282522ce5b5 |
|
MD5 | 7f3fd2ea9ae1b2e6d661c8d9130607ac |
|
BLAKE2b-256 | d5b73c0692f7b28ea1aec17f586758f951499bb46a345d4f996048a563f44990 |
Hashes for scout_apm-2.1.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5fd678ded0b410b0510c7e2b5ff642d85bdd8097a11ac5f97d2ce4cf57fb3ec |
|
MD5 | 65c5f2f3f3590cdc4dd9f21a79ab0fad |
|
BLAKE2b-256 | 144605e7736c98638dc6b5fab5f7162eac85dbf08f64524497ad353ef539df24 |
Hashes for scout_apm-2.1.0-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f87d439e24dc40eb0ed489e9a31bcac8baee8cc6e2cf1892fce64ebfb54256b |
|
MD5 | cb5d401bb14d494d8d9d95327975d66e |
|
BLAKE2b-256 | 85f4d20437b57655386d168175ca462f94061981373564675fb6e8f586153db5 |
Hashes for scout_apm-2.1.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4e2eacefd99e15803deff48380556f3fafc3ddd7f66477e8d012364d9358537 |
|
MD5 | 30799256c153a170a11a62dec4720c60 |
|
BLAKE2b-256 | 0e6e1b1ccba9693d3be19b1efbf00c26f2f6b5bb01ecc79c1a4188524ea1e86b |
Hashes for scout_apm-2.1.0-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12c8fdeb9139c9cc8da3c9b39d682d510550e1f03fe79ea0da88b40ab428619e |
|
MD5 | 4d999fb1408b3caa56c08d89f419ed77 |
|
BLAKE2b-256 | 1694052f68f87f246574b39aa50b05bcfdf53f84ec64cfae7a7b5a62a9a0b6b8 |
Hashes for scout_apm-2.1.0-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e30ff05bd52830262eccc215401b812243662363fae1c30df9a0ded9da175241 |
|
MD5 | fb502401bad1ba9b98911aefd893f345 |
|
BLAKE2b-256 | 267deb4a92f0192bf22331e8786b678851e751fb41079473e12cce8b9d192141 |
Hashes for scout_apm-2.1.0-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 146c7ced12a9905cfd82feb58b4a5c3b0f5ddbd1270065069cb0af0c7337291e |
|
MD5 | 4a2a0602fc757408a74a78883c645f31 |
|
BLAKE2b-256 | c41b588e090a01df4dcc1c60864cf1de1a8feb880f7dc78089fe07a12b62a057 |
Hashes for scout_apm-2.1.0-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf738c62eab78cfaf9f63481c322eb598d15d160f0722f03669c912442096c70 |
|
MD5 | 332e628b2cb38ab07aa32cda697b1c97 |
|
BLAKE2b-256 | a1e53d3c1efcee1c8d8043328ad01fc3e58b6e3f6dc106c8f516610238a7821d |
Hashes for scout_apm-2.1.0-cp34-cp34m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34f3e6b202cbbff32b92894d12b327b368a81a4e6e0b2c20cfba648e16c264d4 |
|
MD5 | 31c4908214e9f9f0eb820b3350320a80 |
|
BLAKE2b-256 | 08cc1aa0078730ba8d6fa29122c9114368e204f67a149d5d4cf8d5109e9f99fc |