Analyzing and Inspecting with AWS X-Ray

Analyzing and Inspecting with AWS X-Ray

In this step, we will analyze and inspect the serverless application using AWS X-Ray. From important metrics — especially latency — we can derive optimization strategies to improve performance.

  1. Access the previously created trigger and copy the API endpoint:

xray

  1. Use Postman to test the API endpoint (send about 5 to 7 requests):

xray

  1. Go to the Trace Map Console
  • Observe the diagram with 3 main components: Client, Lambda Context, and Lambda Function
  • Click on Lambda Function

xray

  1. The details of the selected Lambda Function will appear, including options for Metrics, Alerts, Response time distribution — click on Metrics
  • View metrics such as Latency (avg), Requests, Faults
  • Check the graphs for Latency (avg), Requests, Faults

xray

  1. Click on Response time distribution, and note that the average response time is around 4%

xray

  1. Click View traces to see detailed trace data

xray

  1. The Traces interface appears. Browse through the traces and review important metrics.

xray

  1. Click on any trace to view the detailed breakdown:

xray

  1. Return to the Traces interface and click Refine query by

xray

  1. In the User annotations section, choose aws:responseLatency. This is a key metric showing how long a request takes to process. Based on this, you can evaluate the application’s performance.

xray

  1. A table of traces will appear, sorted by descending latency. From this, you can see that the application has a peak latency of 312.446 ms, which helps prepare for potential overload situations — when traces gradually exceed latency thresholds.

xray

That concludes the Monitoring and Analysis section. In the next part, we’ll move on to monitoring performance with CloudWatch Custom Metrics.