🃏 X-Ray Flashcards

Test your X-Ray tracing knowledge — segments, annotations, metadata, sampling, and service maps.

Card 1 of 10

Question

What is an X-Ray trace?

Click to reveal answer

Answer

An end-to-end path of a request across services. Composed of segments (one per service) and subsegments (downstream calls).

Click to flip back

All X-Ray Flashcards

1

Q: What is an X-Ray trace?

A: An end-to-end path of a request across services. Composed of segments (one per service) and subsegments (downstream calls).

2

Q: Annotations vs metadata?

A: Annotations are indexed key-value pairs for filtering/searching traces. Metadata is non-indexed data for debugging. Both attach to segments/subsegments.

3

Q: What is the X-Ray daemon?

A: A process that listens on UDP port 2000, collects trace segments, and sends them to the X-Ray API. Required on EC2/ECS. Not needed for Lambda.

4

Q: What is the default X-Ray sampling rule?

A: 1 request per second (reservoir) + 5% of additional requests (rate). Custom rules can override per service or URL path.

5

Q: How do you enable X-Ray in Lambda?

A: Enable Active Tracing in the function configuration. Lambda runs the X-Ray daemon automatically. Add the SDK for custom subsegments.

6

Q: What does an X-Ray service map show?

A: A visual topology of traced services showing connections, latency, error rates, and throughput between components.

7

Q: How does X-Ray trace propagation work?

A: The X-Amzn-Trace-Id header carries the trace ID, parent segment ID, and sampling decision across service boundaries.

8

Q: What is an X-Ray subsegment?

A: Records downstream calls from a service (e.g., DynamoDB query, HTTP call, SQL query). Shows timing, errors, and request details.

9

Q: How do you instrument a Node.js app with X-Ray?

A: Use aws-xray-sdk-core. Wrap the AWS SDK with AWSXRay.captureAWS(). Use captureHTTPs() for HTTP calls. Segments auto-created for Lambda.

10

Q: What are X-Ray groups?

A: Named collections of traces filtered by a filter expression. Useful for organizing traces by application, environment, or error type.

More DVA-C02 Flashcard Decks