patch_all() is unsafe
- Dominant language
- Python
- Stars
- 338
- Forks
- 147
- PR merge metrics
- No merged PRs in 30d
Description
There is a bit of ambiguity of `patch_all()` approach on `aws-xray-sdk-python`. Use thereof automatically enables new patchers regardless to how well they've been tested against real use cases (https://github.com/aws/aws-xray-sdk-python/issues/48, https://github.com/aws/aws-xray-sdk-python/issues/90). This in turn can can lead to a nasty surprise where deployment of lambda function will not work as it patches the calls.
Some ideas on making the situation better:
1. Discourage use of `patch_all()`due to its unsafe nature.
2. Do not include new patchers in `patch_all()` outside of major versions
3. Split `patch_all()` into two functions `patch_all()` and `patch_all_bleeding_edge()` where new, and un-vetted patchers are first introduced into `patch_all_bleeding_edge()` and after they've been tested are then introduced to `patch_all()`
Contributor guide
Assessment
This issue has not been assessed yet.