Error Reporting
Error Reporting counts, analyzes and aggregates the crashes in yourrunning cloud services. The Error Reporting Instrumentation clientprovides a simple way to report errors from your application.
For general information about Error Reporting, readError Reporting Documentation.
The goal of google-cloud is to provide an API that is comfortable to Rubyists.Your authentication credentials are detected automatically in Google CloudPlatform (GCP), including Google Compute Engine (GCE), Google Kubernetes Engine(GKE), Google App Engine (GAE), Google Cloud Functions (GCF) and Cloud Run. Inother environments you can configure authentication easily, either directly inyour code or via environment variables. Read more about the options forconnecting in theAuthentication Guide.
How to report errors
You can easily report exceptions from your applications to ErrorReporting service:
require"google/cloud/error_reporting"# Configure Error Reporting instrumentationGoogle::Cloud::ErrorReporting.configuredo|config|config.project_id="my-project"config.keyfile="/path/to/keyfile.json"end# Insert a Rack Middleware to report unhanded exceptionsuseGoogle::Cloud::ErrorReporting::Middleware# Or explicitly submit exceptionsbeginfail"Boom!"rescue=>exceptionGoogle::Cloud::ErrorReporting.reportexceptionend
See theInstrumentation Guide for more examples.
Additional information
Error Reporting can be configured to use gRPC's logging. To learn more, see theLogging guide.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-10-30 UTC.