X Ray - seanremenyi/Notes_aws_developer GitHub Wiki
xray is a tool which helps developers analyze and debug distributed pplications. Allowing you to troubleshoot the root cause of performance issues and error. Provides a visualiztion of your application's underlying components Provides and end-to-end view or requess as they travel through your application captures latency, HTTP status code and errors Integrations 1.AWS services. You can use xray with EC@, Elastic Container SErvice, Lambda, Elastic Beanstalk, SNS, SQS, DynamoDB, Elastic Load Balancer and API GAteway 2. Integrate with your apps. You can use X-ray with applications written in Java, Node.js, .NET, Go, Ruby, Python 3. API Calls. The x-ray SDK automtically captures metadata for API calls made to AWS services using the AWS SDK. Architecture
Install the x-ray agent. Instll the agent on your ec2 Configure. Instrument your application using the X-ray SDK The X-ray SDK. Gathers information from request and response headers, the code in your application, and metadata about the AWS resources on which it runs, and sends this trace data to X-ray. e.g. incoming HTTP requests, error codes, latency data Used to help developers analyze and debus distributed applications. Service Map. The service map is a visual representation of your application. Xray Agent and SDK. Agent must be installed on your ec2 instance. Use the SDK to instrument your application to send traces to x-ray
The AWS X-Ray SDK sends the data to the X-Ray daemon (noth on your system) which buffers segments in a queue and uploads them to x-ray (the aws service) in batches You need both x-ray SDK and the x-ray daemon on your systems High level requirements/config steps you need the xray SDK nd the xray daemon. You use the SDK to instrument your application to send the required data e.g. data about incoming and outgoing HTTP requests that are being made to your java application
Configurations
On premises and Ec2 instances. Install the X-Ray daemon on your EC2 instance or your on premises servers Elastic Beanstalk. Install the xray daemon on the ec2 instance inside your elastic beanstalk environment Elastic container service. Install the x-ray daemon in its own docker container on your ECS cluster alongside your app Annotations and Indexing Annotations, when instrumenting your application, you can record additional information about requests by using annotations. Can record application specific information These annotations are Key-value pairs that are indexed for use with filter expressions, so that you can search for traces that contain specific data and group related traces together in the console - e.g. game_name=snake, game_id=1243524542