Correlating Logs, Metrics & Traces

You are now in a screen that shows a Trace map which shows the map of the services across which the trace traversed through. LogCorrelation1

Scroll down to the bottom and under Logs you will find the log data across different services captured at the moment this trace was recorded. In this example, you will be able to see log data captured by an ECS Service along with log data recorded by the Lambda function, all at the same time.

This gives great insights into the scenario you are investigating.

With ServiceLens as you saw, you are not only able to the service interaction data through X-Ray traces and get insights into service metric information automatically through dashboards, but also get insights into the context of various microservices through applicatioin logs captured the moment the trace was recorded.

LogCorrelation1

Click on View in CloudWatch Logs Insights button and it would take you to CloudWatch Logs Insights page, select all the log groups that are involved in the mix and also write the query that will fetch the log data. Click on Run query to execute the query and alanyze log data there.