Skip to main content

Scout Application Performance Monitoring Agent

Project description

Scout Python APM Agent

travis pypi docs black

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.

screenshot

Requirements

Python 2.7 or 3.4+.

Scout APM has integrations for the following frameworks:

  • Bottle 0.12+
  • Celery 3.1+
  • Django 1.8+
  • Dramatiq 1.0+
  • Falcon 2.0+
  • Flask 0.10+
  • Nameko 2.0+
  • Pyramid 1.8+

For other frameworks, 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...

Documentation

For full installation instructions, including information on configuring Scout via environment variables and troubleshooting documentation, see our Python docs.

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

scout_apm-2.5.0.tar.gz (39.9 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

scout_apm-2.5.0-py2-none-any.whl (49.8 kB view details)

Uploaded Python 2

scout_apm-2.5.0-cp37-cp37m-manylinux1_x86_64.whl (59.7 kB view details)

Uploaded CPython 3.7m

scout_apm-2.5.0-cp37-cp37m-manylinux1_i686.whl (59.4 kB view details)

Uploaded CPython 3.7m

scout_apm-2.5.0-cp36-cp36m-manylinux1_x86_64.whl (59.7 kB view details)

Uploaded CPython 3.6m

scout_apm-2.5.0-cp36-cp36m-manylinux1_i686.whl (59.4 kB view details)

Uploaded CPython 3.6m

scout_apm-2.5.0-cp35-cp35m-manylinux1_x86_64.whl (59.7 kB view details)

Uploaded CPython 3.5m

scout_apm-2.5.0-cp35-cp35m-manylinux1_i686.whl (59.4 kB view details)

Uploaded CPython 3.5m

scout_apm-2.5.0-cp34-cp34m-manylinux1_x86_64.whl (59.3 kB view details)

Uploaded CPython 3.4m

scout_apm-2.5.0-cp34-cp34m-manylinux1_i686.whl (59.0 kB view details)

Uploaded CPython 3.4m

File details

Details for the file scout_apm-2.5.0.tar.gz.

File metadata

  • Download URL: scout_apm-2.5.0.tar.gz
  • Upload date:
  • Size: 39.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.0 CPython/3.7.1

File hashes

Hashes for scout_apm-2.5.0.tar.gz
Algorithm Hash digest
SHA256 176f30fbfca6ad1a7b3b018eb9c5237cfff018d3d59949319774c60c7520ba9b
MD5 a0e7a678dd5f36d2e8b64f595186ae3c
BLAKE2b-256 96e3faf2a13b1edc2cb806f7fc74155ec802080508fc48c6b97f93e8392c2302

See more details on using hashes here.

File details

Details for the file scout_apm-2.5.0-py2-none-any.whl.

File metadata

  • Download URL: scout_apm-2.5.0-py2-none-any.whl
  • Upload date:
  • Size: 49.8 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.0 CPython/3.7.1

File hashes

Hashes for scout_apm-2.5.0-py2-none-any.whl
Algorithm Hash digest
SHA256 1b23c9a9d4afc10e8060d02bb51b8e0c23351e63c581af248df0b06b269dc2d8
MD5 234123f829fcc4b638cb1f2230e48bcf
BLAKE2b-256 b6a01e23486b2985ba04197844f1156e3285c371aa91a02c7577cc6e7f6ba007

See more details on using hashes here.

File details

Details for the file scout_apm-2.5.0-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: scout_apm-2.5.0-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 59.7 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.0 CPython/3.7.1

File hashes

Hashes for scout_apm-2.5.0-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 7e69017bf3ab300657146630f41cb0bddbc01986923e4e1f7bf3b725a9859dcb
MD5 8080d53fe6acb57c8b7c9c1aa52e114a
BLAKE2b-256 795913826f3f5cb4523d0007e0282dfc57fd20c138a057052df9706e4b2cc5e7

See more details on using hashes here.

File details

Details for the file scout_apm-2.5.0-cp37-cp37m-manylinux1_i686.whl.

File metadata

  • Download URL: scout_apm-2.5.0-cp37-cp37m-manylinux1_i686.whl
  • Upload date:
  • Size: 59.4 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.0 CPython/3.7.1

File hashes

Hashes for scout_apm-2.5.0-cp37-cp37m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 b2884114e9391ed1dfd229bca18953ecb952d9b2301031e6f010168fe8a54b6e
MD5 d5f1dc78ae54b23ec09cf99e47985cbc
BLAKE2b-256 646986b3c216d8f6a2a79f5945f902cef9a168cf5d2185cae194146e1bf88626

See more details on using hashes here.

File details

Details for the file scout_apm-2.5.0-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: scout_apm-2.5.0-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 59.7 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.0 CPython/3.7.1

File hashes

Hashes for scout_apm-2.5.0-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 0311712e3bc805bb1af3a1a018f3b62101a85d2ecdd9ae23f58985579805dd7e
MD5 9d07e6be7ea64865f7552d7e0efee080
BLAKE2b-256 85c4df3640a8bb283e0b9935876b6403037284a5f4c4bd812cee7ee6d7d5c271

See more details on using hashes here.

File details

Details for the file scout_apm-2.5.0-cp36-cp36m-manylinux1_i686.whl.

File metadata

  • Download URL: scout_apm-2.5.0-cp36-cp36m-manylinux1_i686.whl
  • Upload date:
  • Size: 59.4 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.0 CPython/3.7.1

File hashes

Hashes for scout_apm-2.5.0-cp36-cp36m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 10a76d00580e0c8fd7e4a8af41ec45f375950ecf48f1f35126eb7d25590bc78c
MD5 4c884fab939c16eb27340469e1f84320
BLAKE2b-256 1250efa0f033fab8f14d22d6f3d3c1f81c099d9243df0ce8d54be8bc0d69a584

See more details on using hashes here.

File details

Details for the file scout_apm-2.5.0-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

  • Download URL: scout_apm-2.5.0-cp35-cp35m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 59.7 kB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.0 CPython/3.7.1

File hashes

Hashes for scout_apm-2.5.0-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 8e374916ac484ada86ebeb06e2dda7858865095c8575d3360023ec779190b42c
MD5 2f8143ccf38d2996726bc64fc35abef5
BLAKE2b-256 d3c6057b76cdaebc103519ed6d5a7b89118465556accdb2fff8d73fbb5ece08b

See more details on using hashes here.

File details

Details for the file scout_apm-2.5.0-cp35-cp35m-manylinux1_i686.whl.

File metadata

  • Download URL: scout_apm-2.5.0-cp35-cp35m-manylinux1_i686.whl
  • Upload date:
  • Size: 59.4 kB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.0 CPython/3.7.1

File hashes

Hashes for scout_apm-2.5.0-cp35-cp35m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 62cadf1ae35cb827ff924d0600fbd6786e0f5035e15a6bbed964b79227459062
MD5 0744dd1ef8948aa70fdc1eada26215c9
BLAKE2b-256 a5c602fa487fc1218b3c1f045568bf3033806c07bc8a58ef67347ecca20aa969

See more details on using hashes here.

File details

Details for the file scout_apm-2.5.0-cp34-cp34m-manylinux1_x86_64.whl.

File metadata

  • Download URL: scout_apm-2.5.0-cp34-cp34m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 59.3 kB
  • Tags: CPython 3.4m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.0 CPython/3.7.1

File hashes

Hashes for scout_apm-2.5.0-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 0f2c66fab20ab85ec2b87d66cbae6151ce656b891525d7894d0fb2ec685be3a6
MD5 402e56438cabdb343c193dc1cc2921f1
BLAKE2b-256 3f720313d51bedb316bdc550e39ae6c06aac04e175c9ab670d85d4443e6259c4

See more details on using hashes here.

File details

Details for the file scout_apm-2.5.0-cp34-cp34m-manylinux1_i686.whl.

File metadata

  • Download URL: scout_apm-2.5.0-cp34-cp34m-manylinux1_i686.whl
  • Upload date:
  • Size: 59.0 kB
  • Tags: CPython 3.4m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.0 CPython/3.7.1

File hashes

Hashes for scout_apm-2.5.0-cp34-cp34m-manylinux1_i686.whl
Algorithm Hash digest
SHA256 3254b83c86b77bab3fc9dbdd10e74ef92c0b37c8442f834cf58a6daff6ec1c73
MD5 7549a8f9751cd9651728072ef54489ca
BLAKE2b-256 d845c3bcb56347a7c43f18efea73b9a02a1acdadd6ce7a4942555623f0146159

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page