Google Cloud Professional Cloud DevOps Engineer — Question 63
You support a trading application written in Python and hosted on App Engine flexible environment. You want to customize the error information being sent to
Stackdriver Error Reporting. What should you do?
Answer options
- A. Install the Stackdriver Error Reporting library for Python, and then run your code on a Compute Engine VM.
- B. Install the Stackdriver Error Reporting library for Python, and then run your code on Google Kubernetes Engine.
- C. Install the Stackdriver Error Reporting library for Python, and then run your code on App Engine flexible environment.
- D. Use the Stackdriver Error Reporting API to write errors from your application to ReportedErrorEvent, and then generate log entries with properly formatted error messages in Stackdriver Logging.
Correct answer: D
Explanation
The correct answer is D because using the Stackdriver Error Reporting API allows you to directly log customized error messages to Stackdriver. Options A, B, and C are incorrect because they suggest running the application in environments that do not provide the necessary support for customizing error reporting as required by the question.