Exams / DVA-C02 / Tracing with X-Ray / Question 1
DVA-C02 practice question: Tracing with X-Ray (1 of 2)
Troubleshooting and Optimization A free question from our original DVA-C02 practice exam. Try it, then open the answer to see why each option is right or wrong.
A developer instruments an application with AWS X-Ray and wants to search for traces by customer tier, such as finding all slow requests from premium customers with a filter expression. How should the developer record the customer tier?
Choose one answer.
- AA. As metadata on the segment.
- BB. As an annotation on the segment.
- CC. As a separate subsegment named after the tier.
- DD. As a custom sampling rule for each tier.
Show the answer and explanation
Answer: B
- A. Wrong: Metadata can hold any type of data but is not indexed, so it cannot be used in filter expressions.
- B. Right: Correct. Annotations are indexed key-value pairs that you can use in filter expressions to group and find traces.
- C. Wrong: Subsegments record timing for units of work and downstream calls. Naming one after a tier is not a supported way to filter.
- D. Wrong: Sampling rules decide which requests are traced. They do not label traces for searching.
Explanation
X-Ray annotations are simple key-value pairs that are indexed for use with filter expressions and grouping. Metadata holds richer data, such as objects, that you want stored with the trace but do not need to search on. Use annotations for anything you want to filter by.
Study
Keep practising
Answer questions with a score at the end, or practise just this topic with the explanation after each one. No sign-up needed.