nerdexam
Amazon

DVA-C02 · Question #194

A developer is working on a Python application that runs on Amazon EC2 instances. The developer wants to enable tracing of application requests to debug performance issues in the code. Which…

The correct answer is B. Install the AWS X-Ray daemon on the EC2 instances. E. Install and configure the AWS X-Ray SDK for Python in the application. AWS X-Ray requires two components working together: the X-Ray SDK (installed in the application code) instruments requests and generates trace data, while the X-Ray daemon (a background process on the EC2 instance) collects that trace data and forwards it to the X-Ray service…

Submitted by helene.fr· Mar 5, 2026Monitoring and Troubleshooting

Question

A developer is working on a Python application that runs on Amazon EC2 instances. The developer wants to enable tracing of application requests to debug performance issues in the code. Which combination of actions should the developer take to achieve this goal? (Choose two.)

Options

  • AInstall the Amazon CloudWatch agent on the EC2 instances.
  • BInstall the AWS X-Ray daemon on the EC2 instances.
  • CConfigure the application to write JSON-formatted logs to /var/log/cloudwatch.
  • DConfigure the application to write trace data to /var/log/xray.
  • EInstall and configure the AWS X-Ray SDK for Python in the application.

How the community answered

(55 responses)
  • A
    7% (4)
  • B
    75% (41)
  • C
    4% (2)
  • D
    15% (8)

Explanation

AWS X-Ray requires two components working together: the X-Ray SDK (installed in the application code) instruments requests and generates trace data, while the X-Ray daemon (a background process on the EC2 instance) collects that trace data and forwards it to the X-Ray service - making B and E the correct pairing.

Why the distractors are wrong:

  • A - The CloudWatch agent handles metrics and logs, not distributed tracing.
  • C - CloudWatch log ingestion uses its own agent/configuration; writing to /var/log/cloudwatch is not a real mechanism.
  • D - The X-Ray SDK sends trace data to the daemon via a local UDP socket (port 2000 by default), not by writing files to /var/log/xray.

Memory tip: Think of X-Ray as a two-layer sandwich - the SDK is the filling (inside your app, instrumenting code), and the daemon is the bread (outside your app, running on the host, relaying data to AWS). You always need both layers for tracing to work.

Topics

#AWS X-Ray#Application Tracing#Performance Debugging#EC2 Instances

Community Discussion

No community discussion yet for this question.

Full DVA-C02 Practice