Which combination of actions should the developer take to achieve this goal?
(Choose two.)
Install the Amazon CloudWatch agent on the EC2 instances.
Install the AWS X-Ray daemon on the EC2 instances.
Configure the application to write JSON-formatted logs to /var/log/cloudwatch.
Configure the application to write trace data to /var/log/xray.
Install and configure the AWS X-Ray SDK for Python in the application.
Explanations:
Installing the Amazon CloudWatch agent is useful for monitoring and logging metrics but does not specifically enable tracing of application requests, which is the primary goal here.
Installing the AWS X-Ray daemon on the EC2 instances is essential for enabling tracing. The daemon collects trace data from the application and sends it to the AWS X-Ray service for analysis.
Configuring the application to write JSON-formatted logs to /var/log/cloudwatch is related to logging, not tracing. While logs are valuable for debugging, they do not directly enable tracing functionality.
Writing trace data to /var/log/xray is not a standard method for integrating X-Ray with an application. The application should use the X-Ray SDK to automatically manage trace data, rather than manually logging it to a file.
Installing and configuring the AWS X-Ray SDK for Python in the application is crucial for enabling tracing. The SDK allows the application to instrument requests, automatically capture trace data, and send it to the X-Ray daemon.