
Answer-first summary for fast verification
Answer: Enable the Cloud Profiler API and add google-cloud-profiler to your requirements.txt file, Import googlecloudprofiler module and call the googlecloudprofiler.start function
Options B and E are incorrect because Cloud Trace is not designed for continuously gathering CPU and memory usage from applications. Option A is also incorrect since you cannot access the underlying instance in App Engine Standard Environment to install packages directly. The correct steps are to enable the Cloud Profiler API and include `google-cloud-profiler` in your `requirements.txt` file (Option D), and to import the `googlecloudprofiler` module and initiate it with `googlecloudprofiler.start()` (Option C). These steps ensure that your application can continuously report CPU and memory usage to Cloud Profiler. References: [Cloud Profiler Documentation](https://cloud.google.com/profiler/docs/about-profiler), [Profiling Python Applications](https://cloud.google.com/profiler/docs/profiling-python?authuser=2#flexible-environment).
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
Your company is planning to deploy a Python application on Google App Engine Standard Environment. There is a requirement to continuously monitor CPU usage information from your production application. Which two steps will help 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
No comments yet.