How can I link log to xray?

Viewed 759

I am running application on lambda and enabled auto xray. I can see xray data on the console and logs on cloudwatch. But I am looking for a way to link my log to xray data. I'd like to see the logs relate to trace data when I click each trace on xray console. Is it possible to do?

If AWS doesn't support linking them automatically, is there any way to achieve that? Like, send log and trace data to elasticsearch. I am able to put all logs from cloudwatch to elasticsearch but I don't know how to push xray data to ES.

2 Answers

So far, only if by setting up CloudWatch Agent on EC2 and at the same time enable EC2 Plugin in X-Ray SDK you would see log group linked in XRay traces.

In Lambda we do not support linking between logs and traces.

Related