Troubleshooting and Optimization

An application sends traces to AWS X-Ray and records a customer tier as segment metadata. Developers must filter traces by customer tier in X-Ray filter expressions; what should they change?

Show the answer

Correct answerC. Record customer tier as an annotation.

AWhy not this: Metric dimensions identify metric time series, not searchable attributes on X-Ray traces.

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

CWhy this is right: Annotations are indexed attributes that X-Ray filter expressions can query.

DWhy not this: Structured logs support log queries, not filtering traces by an indexed segment attribute.

X-Ray indexes annotations so they can be used in trace filter expressions. Metadata can hold additional trace details but is not indexed for filtering; increasing sampling does not change that.