X-Ray Cheat Sheet
This cheat sheet is based on the AWS Certified Developer Associate walk through by Andrew Brown. Originally I wrote down the cheat sheet from his presentation. However, I thought maybe others might have a use for the same cheat sheet in a searchable format. I really encourage you to watch his walk through over at YouTube.
- X-Ray helps developers analyze and debug applications that utilize microservice architecture
- X-Ray is a distributed tracing system. It is a method used to profile and monitor apps especially those built using a microservice architecture, to pinpoint where failures occur and what causes poor performance
- X-Ray Daemon is a software application that listens for traffic on UDP port 2000, gathers raw segment data and relays it to the AWS X-Ray API. Data is generally not sent directly to the X-Ray API, but passes through the X-Ray Daemon which uploads in data in bulk
- Segments - provides the resource's name, details about the request, and details about the work done
- Subsegments - provide more granular timing information and details about downstream calls that your app made to fulfill the original request
- Service Graph - is a flow chart visualization of average response for microservices and to visually pinpoint failure
- Traces - Collects all segments generated by a single request so you can track the path of requests through multiple services
- Sampling - is an algorithm that decides which requests should be traced. By default the X-Ray SDK records the first request each second and 5% of any additional requests
- Tracing Header - is named X-Amsn-Trace-Id and identifies a trace which are passed along to downstream services
- Filter Expressions - allows you to narrow down specific paths or users
- Groups - allows you to save FilterExpressions so you can quickly filter traces
- Annotations and metadata - allow you to capture additional information in key-value pairs
- Annotations - are indexed for use with filter expressions with a limit of 50
- Metadata - are not indexed. Use metadata to record data you want to store in the trace but don't need to use for searching traces
- Errors - are 400/4xx errors
- Faults - are 400/5xx errors
- Throttle - is 429 Too Many Requests
- X-Ray supports the following languages: Go, Node.js, Ruby, Java, Python, ASP.NET, PHP
- X-Ray supports AWS Service Integrations with the following: Lambda, API Gateway, App Mesh, CloudTrail, CloudWatch, AWS Config, EB, ELB, SNS, SQS, EC2, ECS Fargate
Credits
Andrew Brown from ExamPro