DVA-C02 Question 352
Single answerYou are developing a serverless application using AWS Lambda, API Gateway, and DynamoDB. You enable AWS X-Ray tracing to monitor and debug the application. After deploying the application, you notice that the X-Ray service map is showing incomplete traces with missing nodes. What could be the reason for this issue?
- A
X-Ray tracing is not enabled for all integrated services in the application.
- B
The Lambda function execution role does not have sufficient permissions to publish trace data to X-Ray.
- C
The application code is not instrumented with the X-Ray SDK.
- D
The DynamoDB table is configured with on-demand capacity mode, which is incompatible with X-Ray tracing.
Show answer and explanation
Correct answer: A
Explanation
To generate a complete service map in AWS X-Ray, tracing must be enabled for all integrated services, such as API Gateway, Lambda, and DynamoDB. If tracing is not enabled for one or more of these services, the service map will appear incomplete because trace data is not captured from the missing nodes. The other options either do not directly cause incomplete service maps or are unrelated to the issue described.
- A. Correct.
If X-Ray tracing is not enabled for all integrated services (e.g., API Gateway, Lambda, DynamoDB), the service map may appear incomplete because trace data is not captured for those services.
- B. Incorrect.
While permissions are required for publishing trace data, insufficient permissions would result in no traces being published, rather than incomplete traces.
- C. Incorrect.
Using the X-Ray SDK can enhance trace data, but it is not mandatory for generating a complete service map. AWS services can generate traces without explicit instrumentation in some cases (e.g., Lambda with active tracing).
- D. Incorrect.
The capacity mode of a DynamoDB table does not affect X-Ray tracing. X-Ray works independently of DynamoDB's capacity mode.