{"id":6572,"date":"2024-01-19T09:00:00","date_gmt":"2024-01-19T08:00:00","guid":{"rendered":"https:\/\/blog.besharp.it\/?p=6572"},"modified":"2024-02-02T11:07:16","modified_gmt":"2024-02-02T10:07:16","slug":"hands-on-instrumenting-aws-lambda-with-aws-x-ray","status":"publish","type":"post","link":"https:\/\/blog.besharp.it\/hands-on-instrumenting-aws-lambda-with-aws-x-ray\/","title":{"rendered":"Hands-on: Instrumenting AWS Lambda with AWS X-Ray"},"content":{"rendered":"\n

Introduction<\/h2>\n\n\n\n

Working with microservices<\/strong> has many advantages, but it also has some flaws. One of them undoubtedly is debugging and logging the whole application.\u00a0<\/p>\n\n\n\n

Every microservice may produce logs in a different place, and jumping from one to another while debugging could be time-consuming. <\/p>\n\n\n\n

Moreover, knowing what microservices are part of an application and finding bottlenecks or points of failure can be tricky, especially with massive and poorly documented applications.<\/p>\n\n\n\n

X-Ray solves both problems<\/strong>, providing a centralized point to access your application logs and consult a map representing your microservices, resources, and how they communicate.<\/p>\n\n\n\n

X-Ray Introduction<\/h2>\n\n\n\n

X-Ray is a service that allows you to gather data from applications you want to monitor so that you can analyze them to find possible issues or ways to improve your application performance. Sending trace data for incoming and outbound requests and other events lets you see which AWS resources, microservices, and web APIs are used.<\/p>\n\n\n\n

This process is called \u201cInstrumentation\u201d<\/strong>.<\/p>\n\n\n\n

There are different types of instrumentations:<\/p>\n\n\n\n