AWS Certified DevOps Engineer – ProfessionalMonitoring and LoggingMedium
A DevOps team manages a high-traffic e-commerce application on AWS, utilizing Amazon EC2 instances within an Auto Scaling group behind an Application Load Balancer (ALB). They observe intermittent latency spikes and need to pinpoint whether the issue originates from the ALB, the EC2 instances, or the backend database. To achieve this, they want to establish end-to-end transaction tracing without modifying application code significantly. Which tracing solution is most effective for this scenario?
- AUse VPC Flow Logs to monitor network traffic between components and analyze for bottlenecks.
- BImplement AWS X-Ray by installing the X-Ray daemon on EC2 instances and configuring the ALB to send trace headers.
- CDeploy the CloudWatch agent on EC2 instances to collect host-level metrics and application logs.
- DEnable ALB access logging to S3 and analyze logs using Amazon Athena to identify slow requests.
Show answer & explanationAnswer & explanation
Correct answer: B. Implement AWS X-Ray by installing the X-Ray daemon on EC2 instances and configuring the ALB to send trace headers.
AWS X-Ray is designed for end-to-end transaction tracing across distributed applications. By installing the X-Ray daemon on EC2 instances and configuring the ALB to propagate trace headers, the team can visualize the entire request flow, identify latency bottlenecks in specific services or components, and gain insights without heavy code modifications.
Why the other options are wrong
- A. VPC Flow Logs are for network traffic monitoring and troubleshooting network connectivity or security issues, not for application-level end-to-end transaction tracing to diagnose latency within an application stack.
- C. CloudWatch agent collects metrics and logs, which are useful for monitoring individual components but do not provide direct end-to-end transaction tracing across multiple services.
- D. ALB access logs provide request-level details but do not offer end-to-end tracing across application components or visibility into internal service calls.
AWS X-Ray
A service that helps developers analyze and debug distributed applications by providing an end-to-end view of requests as they travel through your application.
- Traces requests across multiple services and resources.
- Visualizes service maps and identifies performance bottlenecks.
- Supports various programming languages and AWS services.
Memory trick: X-Ray eXamines eXactly eVery eXchange.