A Go app on GKE shows high CPU but low traffic. You need to identify which Go functions consume the most CPU. What should you do?
Choose an answer
Tap an option to check your answer.
Correct answer: Modify your Go application to capture profiling data. Analyze the CPU metrics of your application in flame graphs in Profiler..
Why this is the answer
The correct approach is to modify your Go application to capture profiling data and analyze it in Cloud Profiler. Cloud Profiler allows you to continuously collect and visualize CPU usage, memory allocation, and other performance metrics directly from your running application, including Go applications. Flame graphs in Profiler visually represent the call stack and resource consumption, making it easy to pinpoint which functions are consuming the most CPU. Fluent Bit and Cloud Logging are for collecting and analyzing logs, not for deep code-level CPU profiling. While logs might show errors or high-level resource usage, they won't pinpoint specific function CPU consumption. Cloud Monitoring can show overall CPU metrics but doesn't provide the granular, function-level detail needed to identify bottlenecks within the application code itself. SSHing into nodes and running top provides a snapshot of process-level CPU usage on the node, but it doesn't offer the detailed, function-level profiling within the Go application that Cloud Profiler does.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed