Skip to content

mvantellingen/django-aws-xray

Repository files navigation

https://travis-ci.org/mvantellingen/django-aws-xray.svg?branch=master http://codecov.io/github/mvantellingen/django-aws-xray/coverage.svg?branch=master

django-aws-xray

N.B.: AWS have released a beta version of their official X-Ray Python SDK which supports Django, you might want to consider using that: https://aws.amazon.com/about-aws/whats-new/2017/08/aws-x-ray-sdk-for-python-beta/

Leverage AWS X-Ray for your Django projects! This Django app instruments your code to send traces to the X-Ray daemon.

docs/_static/aws-xray-dashboard.png

Installation

pip install django-aws-xray

Update your Django settings:

INSTALLED_APPS += [
    'django_aws_xray'
]

MIDDLEWARE.insert(0, 'django_aws_xray.middleware.XRayMiddleware')

# Enable various instrumentation monkeypatches
AWS_XRAY_PATCHES = [
    'django_aws_xray.patches.cache',
    'django_aws_xray.patches.redis',
    'django_aws_xray.patches.db',
    'django_aws_xray.patches.requests',
    'django_aws_xray.patches.templates',
]

Settings

Setting Name Default
AWS_XRAY_SAMPLING_RATE Sampling rate 100
AWS_XRAY_EXCLUDED_PATHS Exclude paths []
AWS_XRAY_HOST IP of X-Ray Daemon 127.0.0.1
AWS_XRAY_PORT Port of X-Ray Daemon 2000
AWS_XRAY_PATCHES Patches []

Credits

The database and cache instrumention code was based on the code from django-statsd

About

Unofficial Django app for AWS X-Ray

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published