NA"},"metadata":{"tags":[{"id":"GLOBAL#product#xray","name":"AWS X-Ray","namespaceId":"GLOBAL#product","description":"AWS X-Ray","metadata":{}}]}},{"fields":{"topic":"What is AWS X-Ray?","id":"product-faqs#what-is-aws-xray","customSortOrder":"1","content":"
AWS 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."},"metadata":{"tags":[{"id":"product-faqs#xray-faqs#general","name":"General","namespaceId":"product-faqs#xray-faqs","description":"
Genaral tag for x-ray FAQs","metadata":{}},{"id":"GLOBAL#product#xray","name":"AWS X-Ray","namespaceId":"GLOBAL#product","description":"AWS X-Ray","metadata":{}}]}},{"fields":{"topic":"How do I get started with X-Ray?","id":"product-faqs#how-do-i-get-started-with-xray","customSortOrder":"1","content":"
You can get started with X-Ray by including the X-Ray language SDK in your application and installing the X-Ray daemon. For more information see the X-Ray user guide."},"metadata":{"tags":[{"id":"product-faqs#xray-faqs#using-aws-x-ray","name":"Using AWS X-Ray","namespaceId":"product-faqs#xray-faqs","description":" Using AWS X-Ray tag for X-Ray FAQs","metadata":{}},{"id":"GLOBAL#product#xray","name":"AWS X-Ray","namespaceId":"GLOBAL#product","description":"AWS X-Ray","metadata":{}}]}},{"fields":{"topic":"In which regions is X-Ray available?","id":"product-faqs#in-which-regions-is-xray-available","customSortOrder":"1","content":" See Regional Products and Services for details."},"metadata":{"tags":[{"id":"product-faqs#xray-faqs#regions","name":"Regions","namespaceId":"product-faqs#xray-faqs","description":" Regions tag for x-ray faqs","metadata":{}},{"id":"GLOBAL#product#xray","name":"AWS X-Ray","namespaceId":"GLOBAL#product","description":"AWS X-Ray","metadata":{}}]}},{"fields":{"topic":"How long does it take for trace data to be available in X-Ray?","id":"product-faqs#how-long-does-it-take-for-tracce-data","customSortOrder":"1","content":" Trace data sent to X-Ray is generally available for retrieval and filtering within 30 seconds of it being received by the service."},"metadata":{"tags":[{"id":"product-faqs#xray-faqs#data-handling","name":"Data handling","namespaceId":"product-faqs#xray-faqs","description":" data handling tag for X-Ray faqs","metadata":{}},{"id":"GLOBAL#product#xray","name":"AWS X-Ray","namespaceId":"GLOBAL#product","description":"AWS X-Ray","metadata":{}}]}},{"fields":{"topic":"What is a trace?","id":"product-faqs#what-is-a-trace","customSortOrder":"1","content":" An X-Ray trace is a set of data points that share the same trace ID. For example, when a client makes a request to your application, it is assigned a unique trace ID. As the request makes its way through services in your application, the services relay information regarding the request back to X-Ray using this unique trace ID. The piece of information relayed by each service in your application to X-Ray is a segment, and a trace is a collection of segments."},"metadata":{"tags":[{"id":"product-faqs#xray-faqs#core-concepts","name":"Core Concepts","namespaceId":"product-faqs#xray-faqs","description":" Core Concepts tag for X-Ray FAQs","metadata":{}},{"id":"GLOBAL#product#xray","name":"AWS X-Ray","namespaceId":"GLOBAL#product","description":"AWS X-Ray","metadata":{}}]}},{"fields":{"topic":"Why should I use X-Ray?","id":"product-faqs#why-should-i-use-xray","customSortOrder":"2","content":" Currently, if you build and run distributed applications, you have to rely on a per-service or per-resource process to track requests for your application as it travels across various components that make up your application. This problem is further complicated by the varying log formats and storage mediums across frameworks, services, and resources your application runs on or uses. This makes it difficult to correlate the various pieces of data and create an end-to-end picture of a request from the time it originates at the end-user or service to when a response is returned by your application. X-Ray provides a user-centric model, instead of service-centric or resource-centric model, for collecting data related to requests made to your application. This model enables you to create a user-centric picture of requests as they travel across services and resources. By correlating and aggregating data on your behalf, X-Ray enables you to focus on improving the experience for end-users of your application."},"metadata":{"tags":[{"id":"product-faqs#xray-faqs#general","name":"General","namespaceId":"product-faqs#xray-faqs","description":" Genaral tag for x-ray FAQs","metadata":{}},{"id":"GLOBAL#product#xray","name":"AWS X-Ray","namespaceId":"GLOBAL#product","description":"AWS X-Ray","metadata":{}}]}},{"fields":{"topic":"What types of applications can I use with X-Ray?","id":"product-faqs#what-types-of-applications-can-i-use-with-xray","customSortOrder":"2","content":" X-Ray can be used with distributed applications of any size to trace and debug both synchronous requests and asynchronous events. For example, X-Ray can be used to trace web requests made to a web application or asynchronous events that utilize Amazon SQS queues."},"metadata":{"tags":[{"id":"product-faqs#xray-faqs#using-aws-x-ray","name":"Using AWS X-Ray","namespaceId":"product-faqs#xray-faqs","description":" Using AWS X-Ray tag for X-Ray FAQs","metadata":{}},{"id":"GLOBAL#product#xray","name":"AWS X-Ray","namespaceId":"GLOBAL#product","description":"AWS X-Ray","metadata":{}}]}},{"fields":{"topic":"Can I use X-Ray to track requests from applications or services spread across multiple regions?","id":"product-faqs#can-i-use-xray-to-track-requests","customSortOrder":"2","content":" Yes, you can use X-Ray to track requests flowing through applications or services across multiple regions. X-Ray data is stored locally to the processed region but with enough information to enable client applications to combine the data and provide a global view of traces. Region annotation for AWS services will be added automatically, however, customers will need to instrument custom services to add the regional annotation to make use of the cross-region support."},"metadata":{"tags":[{"id":"product-faqs#xray-faqs#regions","name":"Regions","namespaceId":"product-faqs#xray-faqs","description":" Regions tag for x-ray faqs","metadata":{}},{"id":"GLOBAL#product#xray","name":"AWS X-Ray","namespaceId":"GLOBAL#product","description":"AWS X-Ray","metadata":{}}]}},{"fields":{"topic":"How far back can I query the trace data? How long does X-Ray store trace data for?","id":"product-faqs#how-far-back-can-i-query","customSortOrder":"2","content":" X-Ray stores trace data for the last 30 days. This enables you to query trace data going back 30 days."},"metadata":{"tags":[{"id":"product-faqs#xray-faqs#data-handling","name":"Data handling","namespaceId":"product-faqs#xray-faqs","description":" data handling tag for X-Ray faqs","metadata":{}},{"id":"GLOBAL#product#xray","name":"AWS X-Ray","namespaceId":"GLOBAL#product","description":"AWS X-Ray","metadata":{}}]}},{"fields":{"topic":"What is a segment?","id":"product-faqs#what-is-a-segment","customSortOrder":"2","content":" An X-Ray segment encapsulates all the data points for a single component (for example, authorization service) of the distributed application. Segments include system-defined and user-defined data in the form of annotations and are composed of one or more sub-segments that represent remote calls made from the service. For example, when your application makes a call to a database in response to a request, it creates a segment for that request with a sub-segment representing the database call and its result. The sub-segment can contain data such as the query, table used, timestamp, and error status."},"metadata":{"tags":[{"id":"product-faqs#xray-faqs#core-concepts","name":"Core Concepts","namespaceId":"product-faqs#xray-faqs","description":" Core Concepts tag for X-Ray FAQs","metadata":{}},{"id":"GLOBAL#product#xray","name":"AWS X-Ray","namespaceId":"GLOBAL#product","description":"AWS X-Ray","metadata":{}}]}},{"fields":{"topic":"What can I do with X-Ray?","id":"product-faqs#what-can-i-do-with-xray","customSortOrder":"3","content":" X-Ray makes it easy for you to: \n Genaral tag for x-ray FAQs","metadata":{}},{"id":"GLOBAL#product#xray","name":"AWS X-Ray","namespaceId":"GLOBAL#product","description":"AWS X-Ray","metadata":{}}]}},{"fields":{"topic":"What is an annotation?","id":"product-faqs#what-is-an-annotation","customSortOrder":"3","content":" An X-Ray annotation is system-defined or user-defined data associated with a segment. A segment can contain multiple annotations. System-defined annotations include data added to the segment by AWS services, whereas user-defined annotations are metadata added to a segment by a developer. For example, a segment created by your application can automatically be injected with region data for AWS service calls, whereas you might choose to add region data yourself for calls made to non-AWS services."},"metadata":{"tags":[{"id":"product-faqs#xray-faqs#core-concepts","name":"Core Concepts","namespaceId":"product-faqs#xray-faqs","description":" Core Concepts tag for X-Ray FAQs","metadata":{}},{"id":"GLOBAL#product#xray","name":"AWS X-Ray","namespaceId":"GLOBAL#product","description":"AWS X-Ray","metadata":{}}]}},{"fields":{"topic":"Which AWS services can I use with X-Ray?","id":"product-faqs#which-services-can-i-use-with-xray","customSortOrder":"3","content":" You can use X-Ray with applications running on EC2, ECS, Lambda, Amazon SQS, Amazon SNS and Elastic Beanstalk. In addition, the X-Ray SDK automatically captures metadata for API calls made to AWS services using the AWS SDK. In addition, the X-Ray SDK provides add-ons for MySQL and PostgreSQL drivers."},"metadata":{"tags":[{"id":"product-faqs#xray-faqs#using-aws-x-ray","name":"Using AWS X-Ray","namespaceId":"product-faqs#xray-faqs","description":" Using AWS X-Ray tag for X-Ray FAQs","metadata":{}},{"id":"GLOBAL#product#xray","name":"AWS X-Ray","namespaceId":"GLOBAL#product","description":"AWS X-Ray","metadata":{}}]}},{"fields":{"topic":"Why do I sometimes see partial traces?","id":"product-faqs#why-do-i-see-partial-traces","customSortOrder":"3","content":" X-Ray makes the best effort to present complete trace information. However, in some situations (connectivity issues, delay in receiving segments, and so on) it is possible that trace information provided by the X-Ray APIs will be partial. In those situations, X-Ray tags traces as incomplete or partial."},"metadata":{"tags":[{"id":"product-faqs#xray-faqs#data-handling","name":"Data handling","namespaceId":"product-faqs#xray-faqs","description":" data handling tag for X-Ray faqs","metadata":{}},{"id":"GLOBAL#product#xray","name":"AWS X-Ray","namespaceId":"GLOBAL#product","description":"AWS X-Ray","metadata":{}}]}},{"fields":{"topic":"What code changes do I need to make to my application to use X-Ray?","id":"product-faqs#what-code-changes-do-i-need-to-make-xray","customSortOrder":"4","content":" If you’re using Elastic Beanstalk, you will need to include the language-specific X-Ray libraries in your application code. For applications running on other AWS services, such as EC2 or ECS, you will need to install the X-Ray daemon and instrument your application code."},"metadata":{"tags":[{"id":"product-faqs#xray-faqs#using-aws-x-ray","name":"Using AWS X-Ray","namespaceId":"product-faqs#xray-faqs","description":" Using AWS X-Ray tag for X-Ray FAQs","metadata":{}},{"id":"GLOBAL#product#xray","name":"AWS X-Ray","namespaceId":"GLOBAL#product","description":"AWS X-Ray","metadata":{}}]}},{"fields":{"topic":"My application components run in their own AWS accounts. Can I use X-Ray to collect data across AWS accounts?","id":"product-faqs#my-application-components-run-in-their-own","customSortOrder":"4","content":" Yes, the X-Ray daemon can assume a role to publish data into an account different from the one in which it is running. This enables you publish data from various components of your application into a central account."},"metadata":{"tags":[{"id":"product-faqs#xray-faqs#data-handling","name":"Data handling","namespaceId":"product-faqs#xray-faqs","description":" data handling tag for X-Ray faqs","metadata":{}},{"id":"GLOBAL#product#xray","name":"AWS X-Ray","namespaceId":"GLOBAL#product","description":"AWS X-Ray","metadata":{}}]}},{"fields":{"topic":"What are errors?","id":"product-faqs#what-are-errors","customSortOrder":"4","content":" X-Ray errors are system annotations associated with a segment for a call that results in an error response. The error includes the error message, stack trace, and any additional information (for example, version or commit ID) to associate the error with a source file."},"metadata":{"tags":[{"id":"product-faqs#xray-faqs#core-concepts","name":"Core Concepts","namespaceId":"product-faqs#xray-faqs","description":" Core Concepts tag for X-Ray FAQs","metadata":{}},{"id":"GLOBAL#product#xray","name":"AWS X-Ray","namespaceId":"GLOBAL#product","description":"AWS X-Ray","metadata":{}}]}},{"fields":{"topic":"What is sampling?","id":"product-faqs#what-is-sampling","customSortOrder":"5","content":" To provide a performant and cost-effective experience, X-Ray does not collect data for every request that is sent to an application. Instead, it collects data for a statistically significant number of requests. X-Ray should not be used as an audit or compliance tool because it does not guarantee data completeness."},"metadata":{"tags":[{"id":"product-faqs#xray-faqs#core-concepts","name":"Core Concepts","namespaceId":"product-faqs#xray-faqs","description":" Core Concepts tag for X-Ray FAQs","metadata":{}},{"id":"GLOBAL#product#xray","name":"AWS X-Ray","namespaceId":"GLOBAL#product","description":"AWS X-Ray","metadata":{}}]}},{"fields":{"topic":"Does X-Ray provide an API?","id":"product-faqs#does-xray-provide-api","customSortOrder":"5","content":" Yes, X-Ray provides a set of APIs for ingesting request data, querying traces, and configuring the service. You can use the X-Ray API to build analysis and visualization applications in addition to those provided by X-Ray."},"metadata":{"tags":[{"id":"product-faqs#xray-faqs#using-aws-x-ray","name":"Using AWS X-Ray","namespaceId":"product-faqs#xray-faqs","description":" Using AWS X-Ray tag for X-Ray FAQs","metadata":{}},{"id":"GLOBAL#product#xray","name":"AWS X-Ray","namespaceId":"GLOBAL#product","description":"AWS X-Ray","metadata":{}}]}},{"fields":{"topic":"What is the X-Ray daemon?","id":"product-faqs#what-is-the-xray-daemon","customSortOrder":"6","content":" The X-Ray daemon collects traces and sends them to the X-Ray service for aggregation, analysis, and storage. The daemon makes it easier for you to send data to the X-Ray service, instead of using the APIs directly."},"metadata":{"tags":[{"id":"product-faqs#xray-faqs#core-concepts","name":"Core Concepts","namespaceId":"product-faqs#xray-faqs","description":" Core Concepts tag for X-Ray FAQs","metadata":{}},{"id":"GLOBAL#product#xray","name":"AWS X-Ray","namespaceId":"GLOBAL#product","description":"AWS X-Ray","metadata":{}}]}},{"fields":{"topic":"Does AWS X-Ray log events to AWS CloudTrail?","id":"product-faqs#product-faqs-x-ray-logs-events-to-aws-cloudtrail","customSortOrder":"15","content":" Yes. X-Ray logs all API calls as management events. It also logs calls on traces as data events, including on PutTraceSegments and GetTimeSeriesServiceStatistics among other APIs. Data events are not logged by default. To log data events, you must configure your CloudTrail trail or event data store to collect them."},"metadata":{"tags":[{"id":"product-faqs#xray-faqs#using-aws-x-ray","name":"Using AWS X-Ray","namespaceId":"product-faqs#xray-faqs","description":" Using AWS X-Ray tag for X-Ray FAQs","metadata":{}},{"id":"GLOBAL#product#xray","name":"AWS X-Ray","namespaceId":"GLOBAL#product","description":"AWS X-Ray","metadata":{}}]}}]},"metadata":{"auth":{},"pagination":{"empty":false,"present":true},"testAttributes":{}},"context":{"page":{"locale":null,"site":null,"pageUrl":"https://aws.amazon.com/xray/faqs/","targetName":null,"pageSlotId":null,"organizationId":null,"availableLocales":null},"environment":{"stage":"prod","region":"us-east-1"},"sdkVersion":"1.0.115"},"refMap":{"manifest.js":"56c38ad8da","rt-groupable-faq.css":"1527d6ac78","rt-groupable-faq.js":"7713d72213","rt-groupable-faq.rtl.css":"8d5c2e0a8b","rt-groupable-faq.css.js":"801ce38d75","rt-groupable-faq.rtl.css.js":"dbea407106"},"settings":{"templateMappings":{"topic":"topic","content":"content","grouping":"grouping"}}}
AWS 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. Currently, if you build and run distributed applications, you have to rely on a per-service or per-resource process to track requests for your application as it travels across various components that make up your application. This problem is further complicated by the varying log formats and storage mediums across frameworks, services, and resources your application runs on or uses. This makes it difficult to correlate the various pieces of data and create an end-to-end picture of a request from the time it originates at the end-user or service to when a response is returned by your application. X-Ray provides a user-centric model, instead of service-centric or resource-centric model, for collecting data related to requests made to your application. This model enables you to create a user-centric picture of requests as they travel across services and resources. By correlating and aggregating data on your behalf, X-Ray enables you to focus on improving the experience for end-users of your application. X-Ray makes it easy for you to: An X-Ray trace is a set of data points that share the same trace ID. For example, when a client makes a request to your application, it is assigned a unique trace ID. As the request makes its way through services in your application, the services relay information regarding the request back to X-Ray using this unique trace ID. The piece of information relayed by each service in your application to X-Ray is a segment, and a trace is a collection of segments. An X-Ray segment encapsulates all the data points for a single component (for example, authorization service) of the distributed application. Segments include system-defined and user-defined data in the form of annotations and are composed of one or more sub-segments that represent remote calls made from the service. For example, when your application makes a call to a database in response to a request, it creates a segment for that request with a sub-segment representing the database call and its result. The sub-segment can contain data such as the query, table used, timestamp, and error status. An X-Ray annotation is system-defined or user-defined data associated with a segment. A segment can contain multiple annotations. System-defined annotations include data added to the segment by AWS services, whereas user-defined annotations are metadata added to a segment by a developer. For example, a segment created by your application can automatically be injected with region data for AWS service calls, whereas you might choose to add region data yourself for calls made to non-AWS services. X-Ray errors are system annotations associated with a segment for a call that results in an error response. The error includes the error message, stack trace, and any additional information (for example, version or commit ID) to associate the error with a source file. To provide a performant and cost-effective experience, X-Ray does not collect data for every request that is sent to an application. Instead, it collects data for a statistically significant number of requests. X-Ray should not be used as an audit or compliance tool because it does not guarantee data completeness. The X-Ray daemon collects traces and sends them to the X-Ray service for aggregation, analysis, and storage. The daemon makes it easier for you to send data to the X-Ray service, instead of using the APIs directly. You can get started with X-Ray by including the X-Ray language SDK in your application and installing the X-Ray daemon. For more information see the X-Ray user guide. X-Ray can be used with distributed applications of any size to trace and debug both synchronous requests and asynchronous events. For example, X-Ray can be used to trace web requests made to a web application or asynchronous events that utilize Amazon SQS queues. You can use X-Ray with applications running on EC2, ECS, Lambda, Amazon SQS, Amazon SNS and Elastic Beanstalk. In addition, the X-Ray SDK automatically captures metadata for API calls made to AWS services using the AWS SDK. In addition, the X-Ray SDK provides add-ons for MySQL and PostgreSQL drivers. If you’re using Elastic Beanstalk, you will need to include the language-specific X-Ray libraries in your application code. For applications running on other AWS services, such as EC2 or ECS, you will need to install the X-Ray daemon and instrument your application code. Yes, X-Ray provides a set of APIs for ingesting request data, querying traces, and configuring the service. You can use the X-Ray API to build analysis and visualization applications in addition to those provided by X-Ray. Yes. X-Ray logs all API calls as management events. It also logs calls on traces as data events, including on PutTraceSegments and GetTimeSeriesServiceStatistics among other APIs. Data events are not logged by default. To log data events, you must configure your CloudTrail trail or event data store to collect them. See Regional Products and Services for details. Yes, you can use X-Ray to track requests flowing through applications or services across multiple regions. X-Ray data is stored locally to the processed region but with enough information to enable client applications to combine the data and provide a global view of traces. Region annotation for AWS services will be added automatically, however, customers will need to instrument custom services to add the regional annotation to make use of the cross-region support. Trace data sent to X-Ray is generally available for retrieval and filtering within 30 seconds of it being received by the service. X-Ray stores trace data for the last 30 days. This enables you to query trace data going back 30 days. X-Ray makes the best effort to present complete trace information. However, in some situations (connectivity issues, delay in receiving segments, and so on) it is possible that trace information provided by the X-Ray APIs will be partial. In those situations, X-Ray tags traces as incomplete or partial. Yes, the X-Ray daemon can assume a role to publish data into an account different from the one in which it is running. This enables you publish data from various components of your application into a central account. \n
General
General
What is AWS X-Ray?
Why should I use X-Ray?
What can I do with X-Ray?
Core Concepts
What is a trace?
What is a segment?
What is an annotation?
What are errors?
What is sampling?
What is the X-Ray daemon?
Using AWS X-Ray
How do I get started with X-Ray?
What types of applications can I use with X-Ray?
Which AWS services can I use with X-Ray?
What code changes do I need to make to my application to use X-Ray?
Does X-Ray provide an API?
Does AWS X-Ray log events to AWS CloudTrail?
Regions
In which regions is X-Ray available?
Can I use X-Ray to track requests from applications or services spread across multiple regions?
Data Handling
How long does it take for trace data to be available in X-Ray?
How far back can I query the trace data? How long does X-Ray store trace data for?
Why do I sometimes see partial traces?
My application components run in their own AWS accounts. Can I use X-Ray to collect data across AWS accounts?