aws / aws-xray-sdk-python

AWS X-Ray SDK for the Python programming language
Apache License 2.0
327 stars 143 forks source link

Add support for the Pyramid framework #114

Open asthasr opened 5 years ago

asthasr commented 5 years ago

As we discussed at re:Invent, there is currently no support for the Pyramid web framework. I am willing to take a stab at an implementation of this. This issue is for discussion and tracking.

haotianw465 commented 5 years ago

Thank you for the follow-up. You can see a reference implementation for Flask middleware here: https://github.com/aws/aws-xray-sdk-python/blob/master/aws_xray_sdk/ext/flask/middleware.py. You can see in the ref implementation that there are helper methods to deciding segment name/sampling decisions etc based on incoming requests. The middleware just need to implement certain hooks in a request/response lifecycle and extract proper fields and capture unhandled exceptions resulting in 5xx.

I'm happy to work with you to add Pyramid support.