DVA-C02 exam dumps

DVA-C02 practice question 355 of 399

AWS Certified Developer - Associate. Associate level, Amazon Web Services. Free question with the correct answer and a full explanation.

DVA-C02 Question 355

Select 3

You are developing a serverless application using AWS Lambda and want to monitor its performance and troubleshoot issues effectively. Which actions should you take to instrument your code for observability?

  1. A

    Use AWS X-Ray SDK to trace requests through your Lambda function and other AWS services.

  2. B

    Log custom metrics to Amazon CloudWatch by using the AWS SDK for CloudWatch.

  3. C

    Enable AWS Lambda's built-in logging feature to automatically correlate logs with traces.

  4. D

    Manually send error details to an external monitoring tool instead of using AWS services.

  5. E

    Add structured logging to your Lambda code to include details like request IDs, timestamps, and error messages.

Show answer and explanation

Correct answers: A, B, E

Explanation

Observability for AWS Lambda involves using tools such as AWS X-Ray for tracing, Amazon CloudWatch for logging and custom metrics, and structured logging to add meaningful context to application logs. Together, these practices enable monitoring, debugging, and troubleshooting in a serverless environment.

  • A. Correct.

    Using AWS X-Ray SDK helps trace requests through your Lambda function and integrated AWS services, providing end-to-end observability.

  • B. Correct.

    Logging custom metrics to CloudWatch allows you to monitor application-specific performance metrics and set alarms if needed.

  • C. Incorrect.

    AWS Lambda does not automatically correlate logs with traces. You need to use AWS X-Ray for tracing and add structured logging for correlation.

  • D. Incorrect.

    Sending error details to an external monitoring tool is not recommended when AWS provides integrated observability solutions like CloudWatch and X-Ray.

  • E. Correct.

    Structured logging helps capture meaningful log data, making it easier to debug and correlate logs with traces or metrics.

Timed practice exam

Take a DVA-C02 practice test under exam conditions

65 questions in 130 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam