Error Reporting on a Python Flask application
Stackdriver Error Reporting is a service to capture and display the errors occurring in the compute services of GCP—App Engine, Cloud Functions, and Compute Engine. The applications developed in Go, Java, .NET, Node.js, Python, and Ruby can use the Error Reporting. Once the Error Reporting is set up, the service captures the errors automatically and in real-time. The captured errors can be viewed in the GCP web console and alerts can be set for notification.
Getting ready
The following are the initial setup verification and network creation steps before the recipe can be executed:
- Create or select a GCP project
- Enable billing and enable the default APIs (some APIs such as BigQuery, storage, monitoring, and few others are enabled automatically)
- Enable the Stackdriver Error Reporting API
How to do it...
In this recipe, we'll create a Linux instance and run a simple Flask application. In the web application, we'll write code to capture an error and send...