DVA-C02 Question 365
Single answerYou are developing a serverless application on AWS using AWS Lambda and API Gateway. The application is experiencing performance issues, and you need to trace requests across multiple services to identify the bottleneck. Which AWS service should you use to implement distributed tracing and analyze the performance of your application?
- A
Amazon CloudWatch Logs
- B
AWS X-Ray
- C
Amazon SNS
- D
AWS CloudTrail
Show answer and explanation
Correct answer: B
Explanation
The correct answer is AWS X-Ray because it is designed for distributed tracing and provides tools to analyze and visualize service interactions. This makes it ideal for identifying bottlenecks and debugging performance issues in distributed systems such as applications using AWS Lambda and API Gateway.
- A. Incorrect.
Amazon CloudWatch Logs is used for logging and monitoring but does not provide distributed tracing capabilities. While it can help you analyze logs, it lacks the ability to trace requests across multiple services.
- B. Correct.
AWS X-Ray is specifically designed for distributed tracing. It allows you to trace incoming requests, analyze service dependencies, and identify performance bottlenecks in distributed applications.
- C. Incorrect.
Amazon SNS is a messaging service and is not intended for tracing or analyzing application performance.
- D. Incorrect.
AWS CloudTrail is used for auditing and monitoring API activity within your AWS account. While it tracks API calls, it does not provide distributed tracing functionality.