Closed
Description
If running inside AWS Lambda, and the function is using asyncio so I need
xray_recorder.configure(service='...', context=AsyncContext())
However if I put it in the global, or in my lambda handler, I always get errors like
cannot find the current segment/subsegment, please make sure you have a segment open
No segment found, cannot begin subsegment
I think it's because Lambda has its own segment created, presumably it's the LambdaContext defined in aws_xray_sdk/core/lambda_launcher.py?
So how should I configure it properly so that @xray_recorder.capture_async can work?