An e-commerce application runs on Amazon ECS with Fargate. The operations team notices that the application's latency increases during peak hours. The engineer needs to correlate high CPU usage with increased request latency to identify the root cause. Which approach should be used?
Container Insights provides CPU metrics; ServiceLens integrates X-Ray traces.
Why this answer
Container Insights for Amazon ECS with Fargate collects CPU, memory, and other metrics, while ServiceLens integrates CloudWatch metrics with AWS X-Ray traces to provide end-to-end visibility. This correlation allows the engineer to identify high CPU usage and its impact on request latency. Option A is incorrect because CloudWatch Logs Insights only analyzes log data, not metrics or traces.
Option C is incorrect because CloudWatch Synthetics canaries monitor endpoint availability and performance from outside, but do not provide internal CPU metrics. Option D is incorrect because setting up a Prometheus server on an EC2 instance adds operational overhead and does not integrate with ECS Fargate natively; Container Insights and ServiceLens are the recommended AWS-native solution.