Course menuDVA-C03

Exams / DVA-C03 / Tracing with X-Ray / Question 1

DVA-C03 practice question: Tracing with X-Ray (1 of 2)

Troubleshooting and Optimization A free question from our original DVA-C03 practice exam. Try it, then open the answer to see why each option is right or wrong.

Last verified against current AWS documentation ·How we write our questions

A team instruments an order API with AWS X-Ray.

Each trace should record the customer's loyalty tier, and the team must find slow requests from premium customers with a filter expression. The team also wants to keep the full cart as JSON for debugging, but nobody needs to search by it.

How should each value be recorded?

Choose one answer.

  1. A. Record the loyalty tier and the cart JSON as metadata.
  2. B. Record the loyalty tier as an annotation, and the cart JSON as metadata.
  3. C. Record the loyalty tier and the cart JSON as annotations.
  4. D. Record the loyalty tier as a subsegment name, and the cart JSON as metadata.
Show the answer and explanation

Answer: B

  • A. Wrong: Metadata is not indexed, so filter expressions cannot find the traces for premium customers. Metadata is right for the cart, but not for the tier.
  • B. Right: Correct. Annotations are simple key-value pairs that X-Ray indexes for filter expressions, so the tier can be searched. Metadata holds richer values such as objects, which suits the cart, and it is not searched. Learn more: AWS X-Ray concepts (opens in a new tab)
  • C. Wrong: The tier can be searched as an annotation, but annotations hold simple key-value pairs rather than objects. A JSON cart is better kept as metadata.
  • D. Wrong: A subsegment name describes a unit of work, not a customer attribute, so it is not the way to filter traces by tier.

Explanation

X-Ray annotations are simple key-value pairs that are indexed for filter expressions, so they should hold values you want to search. Metadata can hold any type, including objects and lists, but it is not indexed and is for data stored with the trace.

Study

Keep practicing

Answer questions with a score at the end, or practice just this topic with the explanation after each one. No sign-up needed.

Want more on Tracing with X-Ray? The 5 full-length practice sets have 11 more Tracing with X-Ray questions, 390 in all, none of them in the free exam. One payment of $14.99, no subscription. See the practice sets