A Python application running on EC2 needs request tracing to debug performance. Which combination of actions should be taken? (Choose two.)
Choose an answer
Tap an option to check your answer.
Correct answer: Install the AWS X-Ray daemon on the EC2 instances., Install and configure the AWS X-Ray SDK for Python in the application..
Why this is the answer
To enable request tracing with AWS X-Ray for a Python application on EC2, two key components are required. First, you must install and configure the AWS X-Ray SDK for Python within your application. This SDK instruments your code to capture trace data, including metadata about requests, responses, and calls to downstream services. Second, you need to install the AWS X-Ray daemon on the EC2 instances. The daemon acts as a software agent that listens for UDP traffic containing trace segments from the SDK, buffers them, and then uploads them to the X-Ray service. Installing the Amazon CloudWatch agent is for collecting metrics and logs, not for X-Ray tracing. Configuring the application to write JSON-formatted logs to /var/log/cloudwatch is for CloudWatch Logs, not X-Ray. Similarly, configuring the application to write trace data to /var/log/xray is incorrect; the X-Ray SDK sends data to the daemon via UDP, not to a file.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed