
Answer-first summary for fast verification
Answer: Import googlecloudprofiler module and call the googlecloudprofiler.start function, Enable the Cloud Profiler API and add google-cloud-profiler to your requirements.txt file
Options B and E are incorrect because Cloud Trace is not designed for continuous CPU and memory usage monitoring. Option A is not applicable since you cannot access the underlying instance in App Engine Standard Environment. The correct actions are C and D: Cloud Profiler is specifically for monitoring CPU and memory usage. You need to enable the Cloud Profiler API, include 'google-cloud-profiler' in your requirements.txt, import the module, and initiate profiling in your application. References: [Cloud Profiler Documentation](https://cloud.google.com/profiler/docs/about-profiler), [Profiling Python in Flexible Environment](https://cloud.google.com/profiler/docs/profiling-python?authuser=2#flexible-environment).
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
Your company is deploying a Python application on Google App Engine Standard Environment and needs to continuously monitor CPU usage in production. Which two actions should you take to achieve this?
A
Install pip and Install the Cloud Profiler package
B
Enable the Cloud Trace API
C
Import googlecloudprofiler module and call the googlecloudprofiler.start function
D
Enable the Cloud Profiler API and add google-cloud-profiler to your requirements.txt file
E
Install pip and Install the Trace package