Which AWS service enables you to collect and visualize trace data in distributed architecture?

Analyze and debug production, distributed applications

X-ray Free Tier includes 100,000 traces recorded and 1,000,000 traces scanned or retrieved per month.

Amazon Web Services China (Beijing) Region • Always Free


Amazon X-Ray helps developers analyze and debug production, distributed applications, such as those built using a microservices architecture. With X-Ray, you can understand how your application and its underlying services are performing to identify and troubleshoot the root cause of performance issues and errors. X-Ray provides an end-to-end view of requests as they travel through your application, and shows a map of your application’s underlying components. You can use X-Ray to analyze both applications in development and in production, from simple three-tier applications to complex microservices applications consisting of thousands of services.

Benefits

Review request behavior

Amazon X-Ray traces user requests as they travel through your entire application. It aggregates the data generated by the individual services and resources that make up your application, providing you an end-to-end view of how your application is performing.

Discover application issues

With Amazon X-Ray, you can glean insights into how your application is performing and discover root causes. With X-Ray’s tracing features, you can follow request paths to pinpoint where in your application and what is causing performance issues. X-Ray provides annotations so you can append metadata to traces, making it possible to tag and filter trace data so you can discover patterns and diagnose issues.

Improve application performance

Amazon X-Ray helps you identify performance bottlenecks. X-Ray’s service maps let you see relationships between services and resources in your application in real time. You can easily detect where high latencies are occurring, visualize node and edge latency distribution for services, and then drill down into the specific services and paths impacting application performance.

Ready to use with Amazon Web Services

Amazon X-Ray works with Amazon EC2, Amazon EC2 Container Service (Amazon ECS), Amazon Lambda, and Amazon Elastic Beanstalk. You can use X-Ray with applications written in Java, Node.js, and .NET that are deployed on these services. 

Designed for a variety of applications

Amazon X-Ray works for both simple and complex applications, either in development or in production. You can analyze simple asynchronous event calls, three-tier web applications, or complex microservices applications consisting of thousands of services. With X-Ray, you can trace requests made to applications that span multiple Amazon Web Services accounts (Only accounts registered in regions within Mainland China), Amazon Web Services China regions and Availability Zones (Only supports availability zones in Mainland China).

Our support for Internet Explorer ends on 07/31/2022. Supported browsers are Chrome, Firefox, Edge, and Safari.

What is AWS X-Ray?

AWS X-Ray is a service developed by Amazon that enables developers to conduct performance analysis and debug distributed microservice-based applications.

X-Ray consolidates information about an application’s architecture into a Service Map, which also includes connections to components and a dependency tree. It enables easier root cause analysis by highlighting the part of application that is problematic, offering request details such as latency, HTTP response status and number of errors.

AWS X-Ray can trace requests made to applications that span multiple AWS accounts, AWS Regions and Availability Zones, offering true end-to-end visibility.

Why X-Ray is a necessity for AWS

As the largest Cloud Service Provider in the world, Amazon has played an active role in promoting the transition from monolithic applications to microservice-based applications. They have witnessed first-hand the difficulties in identifying and solving issues in distributed systems, Jeff Barr of AWS saying:

‘There has been no easy way for developers to “follow-the-thread” as execution traverses EC2 instances, ECS containers, microservices, AWS database and messaging services’.

Leveraging all the data Amazon gathered since the release of their cloud computing services, they had all the necessary information to develop AWS X-Ray and release it in November 2016.

X-Ray Workflow

AWS X-Ray operates on an intuitive workflow that progresses as follows:

  1. Collect traces: X-Ray collects data from each underlying service of an application. To form an end-to-end trace, it adds an HTTP header to requests that do not already have one and passes the header along to additional tiers of request handlers.
  2. Record Traces: AWS X-Ray complies all the gathered data into traces which span from the beginning of your application workflow to the end.
  3. View Service Map: X-Ray creates a map of services used by the application using the trace data. This provides a visual representation of the connections between services in the application and aggregated data for each service.
  4. Analyze Issues: After all the traces are collected and formatted into a Service map, developers are able to drill down into the service to find exactly where and what error is taking place. Developers will be able to identify performance bottlenecks, detect segments of high latency and see the numbers of occuring errors.

X-Ray Disadvantages

While X-Ray is an easy and convenient feature to use with AWS exclusive systems, the tool lacks when it comes to tracing outside the realms of Amazon’s products. This makes third-party traces end abruptly and the resulting service map to inaccurately represent the application’s architecture. It is not possible to trace over the API gateway or track asynchronous invocations such as SNS on Kinesis. In addition, it is difficult to set up connections to developer and testing environments, or identify problems that run across multiple traces.

AWS X-Ray Pricing

As usual with AWS, X-Ray features a free tier. The first 100,000 traces recorded each month, and free for the first 1,000,000 traces retrieved or scanned each month.

Afterwards, traces recorded cost $5 for every 1,000,000 transactions, while traces received or scanned only cost $0.50 for every 1,000,000 transactions.

Which AWS service can the company use to trace user requests as they move through the application's components?

AWS X-Ray provides a complete view of requests as they travel through your application and filters visual data across payloads, functions, traces, services, APIs, and more with no-code and low-code motions.

What AWS service is used to trace your application Lambda?

You can use AWS X-Ray to trace your AWS Lambda functions. Lambda runs the X-Ray daemon and records a segment with details about the function invocation and execution. For further instrumentation, you can bundle the X-Ray SDK with your function to record outgoing calls and add annotations and metadata.

Which AWS service provides tracing and monitoring capabilities for your lambda function?

You can use AWS X-Ray to visualize the components of your application, identify performance bottlenecks, and troubleshoot requests that resulted in an error. Your Lambda functions send trace data to X-Ray, and X-Ray processes the data to generate a service map and searchable trace summaries.

What is tracing in AWS?

A trace collects all the segments generated by a single request. That request is typically an HTTP GET or POST request that travels through a load balancer, hits your application code, and generates downstream calls to other AWS services or external web APIs.