X-Ray CheatSheet

X-Ray Cheat Sheet

  • 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 montior apps, especiallythose build using a microservices architecture, to pinpoint where failure 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 and passes through the X-Ray Daemon which uploads in bulk.
  • Segmenets provideds the resource’s name, details about the request, and details about the work done.
  • Subsegments provide more granular timing infomation and details about the 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 alogithm that decides which requests should be traced. By Default X-Ray SDK records the first request each second and 5% of ay additiional requests.
  • Tracing header is named X-Amzn-Trace-Id and identifies a trace which is passed along the downstream services.
  • Filter Expression allows you to narrow down specific paths or users.
  • Groups allow you to save Filter Expressions so you can quickly filter traces.
  • Annotations and Metadata allow you to capture additional information in key-value pairs
    • Annotations are indexed for uses with filter epxressions 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 searcing traces.
  • Errors are 400 / 4XX errors
  • Faults are 500 / 5XX errors
  • Throttle is 429 Too Many Requests

[[x-ray_Cheat_Sheet]]