Error Reporting counts, analyzes and aggregates the crashes in your
running cloud services. The Error Reporting Instrumentation client
provides a simple way to report errors from your application.
The goal of google-cloud is to provide an API that is comfortable to Rubyists.
Your authentication credentials are detected automatically in Google Cloud
Platform (GCP), including Google Compute Engine (GCE), Google Kubernetes Engine
(GKE), Google App Engine (GAE), Google Cloud Functions (GCF) and Cloud Run. In
other environments you can configure authentication easily, either directly in
your code or via environment variables. Read more about the options for
connecting in the Authentication Guide.
How to report errors
You can easily report exceptions from your applications to Error
Reporting 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
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["Version latestkeyboard_arrow_down\n\n- [0.44.0 (latest)](/ruby/docs/reference/google-cloud-error_reporting/latest)\n- [0.43.0](/ruby/docs/reference/google-cloud-error_reporting/0.43.0)\n- [0.42.3](/ruby/docs/reference/google-cloud-error_reporting/0.42.3) \n\nError Reporting\n===============\n\nError Reporting counts, analyzes and aggregates the crashes in your\nrunning cloud services. The Error Reporting Instrumentation client\nprovides a simple way to report errors from your application.\n\nFor general information about Error Reporting, read [Error Reporting Documentation](https://cloud.google.com/error-reporting/docs/).\n\nThe goal of google-cloud is to provide an API that is comfortable to Rubyists.\nYour authentication credentials are detected automatically in Google Cloud\nPlatform (GCP), including Google Compute Engine (GCE), Google Kubernetes Engine\n(GKE), Google App Engine (GAE), Google Cloud Functions (GCF) and Cloud Run. In\nother environments you can configure authentication easily, either directly in\nyour code or via environment variables. Read more about the options for\nconnecting in the [Authentication Guide](./AUTHENTICATION \"Authentication Guide\").\n\nHow to report errors\n--------------------\n\nYou can easily report exceptions from your applications to Error\nReporting service: \n\n```ruby\nrequire \"google/cloud/error_reporting\"\n\n# Configure Error Reporting instrumentation\nGoogle::Cloud::ErrorReporting.configure do |config|\n config.project_id = \"my-project\"\n config.keyfile = \"/path/to/keyfile.json\"\nend\n\n# Insert a Rack Middleware to report unhanded exceptions\nuse Google::Cloud::ErrorReporting::Middleware\n\n# Or explicitly submit exceptions\nbegin\n fail \"Boom!\"\nrescue =\u003e exception\n Google::Cloud::ErrorReporting.report exception\nend\n```\n\nSee the [Instrumentation Guide](./INSTRUMENTATION \"Instrumentation Guide\") for more examples.\n\nAdditional information\n----------------------\n\nError Reporting can be configured to use gRPC's logging. To learn more, see the[Logging guide](./LOGGING \"Logging guide\")."]]