PROFESSIONAL-CLOUD-DEVOPS-ENGINEER · Question #26
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…
The correct answer is D. Use the Stackdriver Error Reporting API to write errors from your application to. To customize error information sent to Stackdriver Error Reporting from a Python application on App Engine flexible environment, you should directly use the Stackdriver Error Reporting API.
Question
Options
- AInstall the Stackdriver Error Reporting library for Python, and then run your code on a Compute
- BInstall the Stackdriver Error Reporting library for Python, and then run your code on Google
- CInstall the Stackdriver Error Reporting library for Python, and then run your code on App Engine
- DUse the Stackdriver Error Reporting API to write errors from your application to
How the community answered
(27 responses)- A11% (3)
- B4% (1)
- C7% (2)
- D78% (21)
Why each option
To customize error information sent to Stackdriver Error Reporting from a Python application on App Engine flexible environment, you should directly use the Stackdriver Error Reporting API.
Running the code on Compute Engine is a change in deployment environment and doesn't directly address customizing error reporting from the existing App Engine flexible environment application.
Running the code on Google Kubernetes Engine (GKE) is another change in deployment environment and doesn't directly address customizing error reporting from the existing App Engine flexible environment application.
While installing a client library is typically the first step, simply installing it might offer some automatic reporting, but direct API interaction is necessary for deep customization beyond the library's default behavior, especially to control specific fields or contexts not automatically captured.
Using the Stackdriver Error Reporting API directly allows for full programmatic control over the error payload, enabling you to include custom attributes, stack traces, and context information precisely as needed to tailor the error reporting for your application. This method provides the most flexibility for customizing error information, regardless of where the application is hosted, as long as it can make API calls.
Concept tested: Customizing Stackdriver Error Reporting
Source: https://cloud.google.com/error-reporting/docs/reference/rest/v1beta1/projects.events/report
Topics
Community Discussion
No community discussion yet for this question.