Get started with X-Ray - Amazon X-Ray
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Get started with X-Ray

To use X-Ray, you must do the following:

  1. Instrument your application, which allows X-Ray to track how your application processes a request.

    • Use the X-Ray SDKs, X-Ray APIs, ADOT or CloudWatch Application Signals to send trace data to X-Ray. For more information about which interface to use, see Choose an interface.

    For more information about instrumentation, see Instrument your application for Amazon X-Ray.

  2. (Optional) Configure X-Ray to work with other Amazon Web Services that integrate with X-Ray. You can sample traces and add headers to incoming requests, run an agent or collector, and automatically send trace data to X-Ray. For more information, see Integrate Amazon X-Ray with other Amazon Web Services.

  3. Deploy your instrumented application. As your application receives requests, the X-Ray SDK will record trace, segment and subsegment data. In this step, you might also have to set up an IAM policy and deploy an agent or collector.

  4. (Optional) Open a console to view and analyze the data. You can see a GUI representation of a trace map, service map, and more to inspect how your application functions. Use the graphical information in the console to optimize, debug and understand your application. For more information about choosing a console, see Use an Amazon Web Services Management Console.

The following diagram shows how to get started using X-Ray:

X-Ray displays detailed information about application requests including status, duration and HTTP response code.

For an example of the data and maps that are available in the console, launch a sample application that is already instrumented to generate trace data. In a few minutes, you can generate traffic, send segments to X-Ray, and view a trace and service map.