Most modern applications are built on a collection of distributed components, including containers, microservices,...
databases and third-party software. Developers can use traditional debugging and testing tools to find problems within individual parts of the architecture, but they don't provide insight into how an app works across multiple regions or accounts.
Enterprises can tackle this problem with distributed tracing and application performance monitoring tools. AWS X-Ray, a distributed tracing service, can identify faults and diagnose performance issues across distributed apps built on the AWS infrastructure. X-Ray provides insight into AWS Lambda functions and database services that isn't available in other tools, which can be particularly helpful for large enterprises with many app components.
The X-Ray service provides a visual map for developers to identify troublesome areas and drill down to the service level to alleviate problems with distributed apps. Developers incorporate X-Ray through the AWS Management Console, AWS Command Line Interface or AWS software development kits (SDKs) -- currently available for Java, .NET, Python and Node.js.
X-Ray works during the development and production phases. It gathers data about function calls across Elastic Compute Cloud, Elastic Container Service, Lambda, Elastic Beanstalk and native AWS databases. With the X-Ray API, developers can programmatically access the X-Ray service to export or ingest data into their own tools or dashboards.
There are various concepts developers should know about X-Ray. For example, an X-Ray trace is a set of data points that share the same trace ID, while an X-Ray segment encapsulates the data points for a single component, such as a database service. Developers can automatically generate annotations and metadata for specific types of data associated with a segment to analyze distributed apps. They can also capture errors, which are system annotations, associated with a segment, for calls that generate an error response. An X-Ray agent collects data from log files for aggregation, analysis and storage.
By default, X-Ray captures a statistical sampling of traffic to reduce costs, but developers can increase the capture rate when they need more fidelity. The 100,000 traces and 1 million trace scans are free, and it costs $5 per million traces and $0.50 per million scans after that.
X-Ray limitations, competition
X-Ray can only examine issues at a high level. It can tell programmers what service to investigate but not the line of code causing a problem. Developers can enable deeper insight with special customizations or third-party tools but will need different tools to diagnose issues for non-AWS infrastructure.
Dynamic application mapping tools can be broken into two categories: end-to-end tracing and individual tracing. End-to-end tracing techniques include application performance monitoring (APM), as well as tracing SDKs and proxies. APM requires code-embedded agents that run on all services, which provide a high level of but add overhead costs to app performance. Many tools are proprietary and could represent a security risk, as the mechanics of app monitoring can't be analyzed by security teams. APM services include AppDynamics, Relic and Dynatrace.
AWS X-Ray, an individual tracing tool, embeds special code into an application to track entry points and exit calls. These tracing tools, which are lighter than end-to-end APM tools, need to embed agents into the application code. This could present issues for legacy applications, as these tools generate large amounts of data, which is why use of statistical sampling techniques is a common approach to reduce data storage requirements. Similar offerings to AWS X-Ray built for other cloud platforms include Google Cloud Platform Stackdriver Trace and Azure Application Insights.
Individual tracing tools can either use log data or trace the OS of the application itself. In this case, developers create distributed apps that mine data from Apache web servers or Nginx proxies. But these approaches require the most processing power to transform large amounts of raw data into actionable insight.