title: aws-xray-sdk on a lambda function
body: <p>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.</p>
  
  <p>If I want more detailed logging, my understanding is that I need to add:</p>
  
  <pre><code>from aws_xray_sdk.core import xray_recorder
  from aws_xray_sdk.core import patch_all
  patch_all()
  </code></pre>
  
  <p>however, the xry sdk is not part of  lambda. Clearly one of the solutions is to install it with <code>pip install aws-xray-sdk -t .</code> but that will add 42Mb to the function's code.</p>
  
  <p>Is there an alternative solution?
  thanks</p>