According to the X-Ray FAQ , X-Ray only supports the following services: EC2, ECS, Lambda and Elastic Beanstalk. Until X-Ray adds Gateway API support, you will not be able to track w / X-Ray API gateway calls.
X-Ray docs say metadata is added to AWS SDK calls made for AWS, so you see X-Ray trace data for other AWS called by your Lambda function.
This X-Ray documentation says that the Gateway API does not pass trace data to X-Ray, so you cannot use the same method that X-Ray provides for the AWS SDK. For example, if you used the X-Ray operation PutTraceSegments
just before calling the API APIs, you will get two separate traces for each call. It looks like you have to wait until the X-Ray and the API gateway are integrated. Hope this will happen soon.
source
share