Skip to content

Repository files navigation

NOTE

AWS has released the beta version of their Python X-ray SDK - check it out here: https://aws.amazon.com/about-aws/whats-new/2017/08/aws-x-ray-sdk-for-python-beta/

xrayvision

Utilities and wrappers for using AWS X-Ray with Python

WSGI Apps

Simply add the middleware to your app. For example, if you use Flask:

fromxrayvision.ext.wsgiimportXRayMiddlewareapp=Flask(__name__)
app.wsgi_app=XRayMiddleware(app.wsgi_app)

You can add subsegments with the global_segment:

fromxrayvisionimportglobal_segment
...
withglobal_segment.add_subsegment('my custom loop') assegment:
try:
# do stuffexcept:
segment.add_exception()

Requests

Requests must be patched as early as possible in your code.

importrequestsimportxrayvisionxrayvision.patch('requests')

About

Utilities and wrappers for using AWS X-Ray with Python

Topics

Resources

Stars

24 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages