I always find it exciting to try out new technologies and things. One of these things is AWS X-Ray, a service that allows you to examine distributed systems and visualize the communication between the individual components. The goal is usually a microservice architecture, but different types of applications can be examined with X-Ray.

So out of curiosity I started researching the communication on this blog here. In an earlier blog post I showed what the architecture looks like and how step functions are used, among other things. This essentially results in two scenarios that are interesting:

  1. A user writes a comment on an article
  2. A user fills out the contact form and submits it

When I read the documentation from X-Ray, the first thing I noticed was that X-Ray does not initially support many services. For example, I missed the integration with CloudFront. What struck me positively, however, was that the integration of X-Ray is usually very easy. In my case I only had to switch on the X-Ray tracing in my starting point (ApiGateway). I then had to do the same for StepFunctions. The Lambda functions carried out by the StepFunctions, on the other hand, no longer require any further treatment: They automatically recognize that they are part of an X-Ray communication chain and deliver the data accordingly to the X-Ray deamon, which is integrated into Lambda as standard. No separate activation was necessary for DynamoDb either.

After activating the tracing, I could already see the first data in the x-Ray console:

This map shows the data that was created when the contact form was sent several times. I could see at a glance what was taking the most time to process the request. X-Ray also gives you the opportunity to learn more details:

In addition to the details shown here, each individual trace can be examined and used to investigate possible causes. I’m amazed at how easy it was to integrate X-Ray and I will certainly continue to play around with it.