AWS Certified Developer – Associate / Question #982 of 557

Question #982

A developer is troubleshooting latency issues in a distributed application composed of multiple microservices running on Amazon EC2 instances. The developer needs to trace requests across all microservices to identify the specific components causing delays and analyze performance bottlenecks.

What should the developer implement to achieve this goal?

A

Configure Amazon CloudWatch to collect custom metrics and logs from each microservice, then use CloudWatch dashboards to visualize latency data.

B

Enable AWS CloudTrail to log API calls across all microservices and analyze the logs to trace request paths and latency.

C

Integrate the AWS X-Ray SDK into all microservices to generate traces, then use X-Ray's service map and analytics to identify latency issues.

D

Use AWS Health Dashboard to monitor resource performance and identify EC2 instances contributing to latency problems.

Explanation

AWS X-Ray (Option C) is the correct choice because it provides end-to-end tracing capabilities for distributed applications. By integrating the X-Ray SDK into each microservice, the developer can generate detailed traces of requests as they propagate through the system. X-Ray's service map visually represents the flow of requests and highlights latency issues, while its analytics tools help pinpoint performance bottlenecks.

Option A (CloudWatch) focuses on metrics and logs but lacks distributed tracing capabilities. Option B (CloudTrail) logs API calls for auditing, not performance analysis. Option D (AWS Health Dashboard) monitors AWS infrastructure health, not application-level latency. X-Ray is uniquely suited for tracing requests across microservices and diagnosing latency issues in distributed architectures.

Answer

The correct answer is: C