Skip to main content

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.

screenshot

Requirements

Python Versions:

Scout APM works with the following frameworks:

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

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"

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

## Attaches 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...

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)

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@scoutapp.com or create an issue in this repo.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
scout_apm-1.3.8.tar.gz (41.2 kB) Copy SHA256 hash SHA256 Source None Oct 1, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page