Skip to content

dnmellen/xrayvision

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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:

from xrayvision.ext.wsgi import XRayMiddleware app = Flask(__name__) app.wsgi_app = XRayMiddleware(app.wsgi_app)

You can add subsegments with the global_segment:

from xrayvision import global_segment ... with global_segment.add_subsegment('my custom loop') as segment: try: # do stuff except: segment.add_exception()

Requests

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

import requests import xrayvision xrayvision.patch('requests')

About

Utilities and wrappers for using AWS X-Ray with Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%