Reputation: 2507
I need to to understand how long does it take for a Python application hosted on top of Google Kubernetes Engine to handle a given request.
How can I can get and debug this value? Should I use StackDriver Profiler or configure StackDriver Trace? It's not clear to me which tool I should configure in order to get this info in the right way from StackDriver.
Upvotes: 0
Views: 1416
Reputation: 2533
Cloud Trace tells you how long it takes an application to handle a given request. Cloud Trace collects latency data from App Engine, HTTP(S) load balancers, and applications instrumented with the Cloud Trace API, it can help you answer the following questions:
Cloud Trace is a distributed tracing system that collects latency data from your applications and displays it in the Google Cloud Console. You can track how requests propagate through your application and receive detailed near real-time performance insights, how long it takes your application to handle incoming requests from users or other applications, and how long it takes to complete operations like RPC calls performed when handling the requests. Cloud Trace automatically analyzes all your application's traces to generate in-depth latency reports to surface performance degradations, and can capture traces from all your VMs, containers, or App Engine projects. Once you’ve determined which requests might need to be optimized, you can use Cloud Profiler to see which parts of the code for those requests are using the most CPU and memory.
Analysis reports show you the latency distribution for your application and also attempt to identify performance bottlenecks, which is a great feature. You have to have at least 100 traces before you can run a report, though.
Refer Finding and viewing traces for information.
Upvotes: 1