Troubleshooting and Optimization

A service sends traces to AWS X-Ray and records deployment identifiers as metadata. Developers need to find traces for a specific deployment using X-Ray filter expressions. What should they change?

Show the answer

Correct answerD. Record the deployment identifier as a string annotation

AWhy not this: Segment names identify services; custom deployment attributes belong in indexed annotations.

BWhy not this: Sampling more requests increases trace coverage but does not make metadata searchable.

CWhy not this: Structured logs support log searches but do not make the identifier searchable in X-Ray filter expressions.

DWhy this is right: X-Ray indexes string annotations, allowing traces to be selected by deployment identifier.

X-Ray indexes annotations so filter expressions can select traces by custom attributes. Metadata can hold additional diagnostic data, but its values are not indexed for trace filtering.