Debug your Container and Serverless Applications with AWS X-Ray in 5 Minutes - AWS Online Tech Talks
Apr. 30, 2018•0 likes•2,087 views
Report
"Learning Objectives:
- Go beyond basic use cases and learn how to extract deeper value from X-Ray
- Leverage X-Ray to track and alert on performance trends and understand customer impact
- Learn best practices to monitor Serverless applications"
Traditional debugging involves:
A development environment
Search through logs for clues to reproduce the issue
Set breakpoints in code to stop execution, and inspect variables and call stack
Add additional log statements as necessary and redeploy application
Repeat until the issue is fixed
Speaker notes: With AWS X-Ray integration you will see the complete end-to-end overview of your distributed application.
Speaker notes: You can click on a specific node to see the high-latency requests to that service. In this case, the DynamoDB node is selected, and we are selecting high-latency requests from the latency histogram and clicking on view traces. We would like to see what is happening with these requests.
Speaker notes: In this case, DynamoDB is taking a long time. Usually DDB returns back within a few milliseconds, but this request has taken 2.1 seconds to get back. Let us click on the DDB in the trace timeline and see whats happening.
Speaker notes: It has taken multiple retries. Using X-Ray, you can quickly zero-in on the performance bottleneck and understand why it is happening. In this case, you can reach out to the DDB team with the requestID to see what is the actual reason on multiple retries.
Speaker notes: You can also quickly pinpoint an issue using AWS X-Ray. This exception stack is showing you had a conditional check failed exception at the specific line-item in your code.
Speaker notes: X-Ray also helps you identify errors in your services. Here you can see that I can quickly group my traces using the status code and see that 100% of my traces within a specific time frame had 409 error. The trace list is at the bottom to drill-down further into specific traces.
Speaker notes: In this case I have an exception/error from DynamoDB. I can quickly identify the root cause of the error using X-Ray.
Speaker notes: Finally, I can use annotations feature in X-Ray to quickly identify impact for specific user. Here a user with this specific email is having all his requests failed. We can quickly drill down and see whats happening in the traces.
Speaker notes: When you enable X-Ray for Lambda you get a complete overview of your Lambda application and other downstream services. You can notice that there is an error in Rekognition. X-Ray helps you drill-down and look at specific error happening in Rekognitiion.
EV: JH to fix.
JH: agreed, integrate with previous themes
JH: we need to do a diagram of xray daemon on an instance, buffering messages, filtering/ dropping some, passing to x-ray API -> passing to a dashboard..
Explain that Daemon listens locally on UDP
Receives data from the SDK over UDP and acts as a local buffer. Data is flushed to the backend every second or when the local buffer fills.
Available for Amazon Linux AMI, RHEL, Ubuntu, OS X, and Windows
Trace - End-to-end data related a single request across services
Segments - Portions of the trace that correspond to a single service
Sub-segments - Remote call or local compute sections within a service