X-Ray Flashcards

1
Q

Definition of an X-RAY “Trace”

A

Detailed View of an individual operation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Three use cases for X-RAY “Subsegments”

A

Downstream calls made by your application to fulfill original request
To generate “inferred” segments on services (like Dynamo) that don’t
create their own segments
To instrument local code / more granular vies into a segment

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do you enable X-Ray on ECS? EKS?

A

ECS / Fargate: add an X-Ray sidecar to the Task Definition
EKS or K8S: run an X-Ray pod as a “daemon set”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

On which port does the X-Ray Daemon listen?

A

UDP 2000

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Why would you favor using “AWS Distro for Open Telemetry” rather than X-Ray?

A

The former can send your traces to multiple simultaneous backends without code modification – for example, to DataDog, New Relic, X-Ray, etc. The X-Ray SDK can only send to X-Ray – changes would have to be made to the application code.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How is X-Ray implemented differently in ECS vs. EKS?

A

In ECS (EC2 or Fargate), the X-Ray Daemon is placed in a sidecar container in the task definition

In EKS (EC2) the Daemon is deployed as a Daemon Set. For EKS Fargate, sidecar.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the “ResultPath” field in a SF state definition? What does it control?

A

It controls how the raw input to a state is combined (if at all) with the output to produce a result. The result can be: input only, output only, or input+output

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Provide an example of when you might use an X-Ray annotation.

What would you use metadata for?

A

For an e-commerce platform, you might want to assign each trace to a user category – “guest,” “registered,” “premium.” Then you can filter and find all traces relevant to a certain type of customer.

segment.put_annotation(“user_category”, “premium”)

Metadata can’t be filtered / searched, so it isn’t useful for aggregating information. Instead, detailed information if you need to troubleshoot a certain train. In this example, metadata is capturing the detailed configuration of a recommendation engine:

segment.put_metadata(“recommendation_config”, {
“algorithm”: “collaborative_filtering”,
“version”: “v1.2”,
“weightings”: {
“purchase_history”: 0.8,
“view_history”: 0.2
}
})

How well did you know this?
1
Not at all
2
3
4
5
Perfectly