I see that I can enable x-ray tracing on my lambda function just by checking a checkbox (or setting Tracing: Active if using SAM). That adds a high level logging.
If I want more detailed logging, my understanding is that I need to add:
from aws_xray_sdk.core import xray_recorder
from aws_xray_sdk.core import patch_all
patch_all()
however, the xry sdk is not part of lambda. Clearly one of the solutions is to install it with pip install aws-xray-sdk -t .
but that will add 42Mb to the function's code.
Is there an alternative solution? thanks