Lightweight Application Performance Monitoring middleware that measures and reports performance data to HowFast APM
Project description
Light instrumentation of your Python server for reporting performance data to HowFast APM.
Install
To install / update the module:
pip install howfast-apm
Usage
Only the Flask middleware is currently available.
from howfast_apm.flask import HowFastMiddleware
# Create your Flask app
app = Flask(__name__, ...)
# Instanciate all your other middlewares first
# Setup the APM middleware last, so that it can track the time spent inside other middlewares
app.wsgi_app = HowFastMiddleware(
app.wsgi_app,
app_id=HOWFAST_APM_DSN,
)
Configuration
You can configure the APM through environment variables. If they are defined, those variables will be used. Parameters passed to the HowFastMiddleware constructor take precedence over environment variables.
Only one variable is available for now:
HOWFAST_APM_DSN: The DSN (application identifier) that you can find on your APM dashboard. Can also be passed to the constructor as app_id.
If the environment variable is defined you can then use:
app.wsgi_app = HowFastMiddleware(app.wsgi_app)
You can also choose to exclude some URLs from reporting:
app.wsgi_app = HowFastMiddleware(
app.wsgi_app,
endpoints_blacklist=['/some/internal/url/'],
)
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 Distributions
Built Distribution
Hashes for howfast_apm-0.1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d76ae66739739ec5b08de0ba903a5bc917a1d3f351620317a6f5c6c5f67ec085 |
|
MD5 | b6f81317f0096316fd82d09ae9f1f2ab |
|
BLAKE2b-256 | 268bc63bc4271f0329e841a91981c0f0b576c49b400faacd4ba485e23e86450d |