Reference documentation and code samples for the Error Reporting V1beta1 API class Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Client.
# Modify the configuration for all ReportErrorsService clients::Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Client.configuredo|config|config.timeout=10.0end
Configure the ReportErrorsService Client instance.
The configuration is set to the derived mode, meaning that values can be changed,
but structural changes (adding new fields, etc.) are not allowed. Structural changes
should be made on Client.configure.
See Configuration
for a description of the configuration fields.
# Create a client using the default configurationclient=::Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Client.new# Create a client using a custom configurationclient=::Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Client.newdo|config|config.timeout=10.0end
#logger
deflogger()->Logger
The logger used for request/response debug logging.
Report an individual error event and record the event to a log.
This endpoint accepts either an OAuth token,
or an API key
for authentication. To use an API key, append it to the URL as the value of
a key parameter. For example:
POST
https://clouderrorreporting.googleapis.com/v1beta1/\{projectName}/events:report?key=123ABC456
Note:Error Reporting
is a service built on Cloud Logging and can analyze log entries when all of
the following are true:
Customer-managed encryption keys (CMEK) are disabled on the log bucket.
The log bucket satisfies one of the following:
The log bucket is stored in the same project where the logs
originated.
The logs were routed to a project, and then that project stored those
logs in a log bucket that it owns.
Pass arguments to report_error_event via keyword arguments. Note that at
least one keyword argument is required. To specify no parameters, or to keep all
the default parameter values, pass an empty Hash as a request object (see above).
Parameters
project_name (::String) — Required. The resource name of the Google Cloud Platform project. Written
as projects/{projectId}, where {projectId} is the
Google Cloud Platform project
ID.
require"google/cloud/error_reporting/v1beta1"# Create a client object. The client can be reused for multiple calls.client=Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Client.new# Create a request. To set request fields, pass in keyword arguments.request=Google::Cloud::ErrorReporting::V1beta1::ReportErrorEventRequest.new# Call the report_error_event method.result=client.report_error_eventrequest# The returned object is of type Google::Cloud::ErrorReporting::V1beta1::ReportErrorEventResponse.presult
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-03 UTC."],[],[],null,["# Error Reporting V1beta1 API - Class Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Client (v0.14.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.14.0 (latest)](/ruby/docs/reference/google-cloud-error_reporting-v1beta1/latest/Google-Cloud-ErrorReporting-V1beta1-ReportErrorsService-Client)\n- [0.13.1](/ruby/docs/reference/google-cloud-error_reporting-v1beta1/0.13.1/Google-Cloud-ErrorReporting-V1beta1-ReportErrorsService-Client)\n- [0.12.0](/ruby/docs/reference/google-cloud-error_reporting-v1beta1/0.12.0/Google-Cloud-ErrorReporting-V1beta1-ReportErrorsService-Client)\n- [0.11.1](/ruby/docs/reference/google-cloud-error_reporting-v1beta1/0.11.1/Google-Cloud-ErrorReporting-V1beta1-ReportErrorsService-Client)\n- [0.10.0](/ruby/docs/reference/google-cloud-error_reporting-v1beta1/0.10.0/Google-Cloud-ErrorReporting-V1beta1-ReportErrorsService-Client)\n- [0.9.2](/ruby/docs/reference/google-cloud-error_reporting-v1beta1/0.9.2/Google-Cloud-ErrorReporting-V1beta1-ReportErrorsService-Client)\n- [0.8.0](/ruby/docs/reference/google-cloud-error_reporting-v1beta1/0.8.0/Google-Cloud-ErrorReporting-V1beta1-ReportErrorsService-Client)\n- [0.7.0](/ruby/docs/reference/google-cloud-error_reporting-v1beta1/0.7.0/Google-Cloud-ErrorReporting-V1beta1-ReportErrorsService-Client)\n- [0.6.0](/ruby/docs/reference/google-cloud-error_reporting-v1beta1/0.6.0/Google-Cloud-ErrorReporting-V1beta1-ReportErrorsService-Client)\n- [0.5.1](/ruby/docs/reference/google-cloud-error_reporting-v1beta1/0.5.1/Google-Cloud-ErrorReporting-V1beta1-ReportErrorsService-Client)\n- [0.4.5](/ruby/docs/reference/google-cloud-error_reporting-v1beta1/0.4.5/Google-Cloud-ErrorReporting-V1beta1-ReportErrorsService-Client) \nReference documentation and code samples for the Error Reporting V1beta1 API class Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Client.\n\nClient for the ReportErrorsService service.\n\n\n\u003cbr /\u003e\n\nAn API for reporting error events. \n\nInherits\n--------\n\n- Object \n\nIncludes\n--------\n\n- [Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Paths](./Google-Cloud-ErrorReporting-V1beta1-ReportErrorsService-Paths)\n\nMethods\n-------\n\n### .configure\n\n def self.configure() { |config| ... } -\u003e Client::Configuration\n\nConfigure the ReportErrorsService Client class.\n\n\n\u003cbr /\u003e\n\nSee [Configuration](/ruby/docs/reference/google-cloud-error_reporting-v1beta1/latest/Google-Cloud-ErrorReporting-V1beta1-ReportErrorsService-Client-Configuration \"Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Client::Configuration (class)\")\nfor a description of the configuration fields. \n**Yields**\n\n- (config) --- Configure the Client client. \n**Yield Parameter**\n\n- **config** ([Client::Configuration](./Google-Cloud-ErrorReporting-V1beta1-ReportErrorsService-Client-Configuration)) \n**Returns**\n\n- ([Client::Configuration](./Google-Cloud-ErrorReporting-V1beta1-ReportErrorsService-Client-Configuration))\n**Example** \n\n```ruby\n# Modify the configuration for all ReportErrorsService clients\n::Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Client.configure do |config|\n config.timeout = 10.0\nend\n```\n\n### #configure\n\n def configure() { |config| ... } -\u003e Client::Configuration\n\nConfigure the ReportErrorsService Client instance.\n\n\nThe configuration is set to the derived mode, meaning that values can be changed,\nbut structural changes (adding new fields, etc.) are not allowed. Structural changes\nshould be made on [Client.configure](/ruby/docs/reference/google-cloud-error_reporting-v1beta1/latest/Google-Cloud-ErrorReporting-V1beta1-ReportErrorsService-Client#Google__Cloud__ErrorReporting__V1beta1__ReportErrorsService__Client_configure_class_ \"Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Client.configure (method)\").\n\n\u003cbr /\u003e\n\nSee [Configuration](/ruby/docs/reference/google-cloud-error_reporting-v1beta1/latest/Google-Cloud-ErrorReporting-V1beta1-ReportErrorsService-Client-Configuration \"Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Client::Configuration (class)\")\nfor a description of the configuration fields. \n**Yields**\n\n- (config) --- Configure the Client client. \n**Yield Parameter**\n\n- **config** ([Client::Configuration](./Google-Cloud-ErrorReporting-V1beta1-ReportErrorsService-Client-Configuration)) \n**Returns**\n\n- ([Client::Configuration](./Google-Cloud-ErrorReporting-V1beta1-ReportErrorsService-Client-Configuration))\n\n### #initialize\n\n def initialize() { |config| ... } -\u003e Client\n\nCreate a new ReportErrorsService client object. \n**Yields**\n\n- (config) --- Configure the ReportErrorsService client. \n**Yield Parameter**\n\n- **config** ([Client::Configuration](./Google-Cloud-ErrorReporting-V1beta1-ReportErrorsService-Client-Configuration)) \n**Returns**\n\n- ([Client](./Google-Cloud-ErrorReporting-V1beta1-ReportErrorsService-Client)) --- a new instance of Client\n**Example** \n\n```ruby\n# Create a client using the default configuration\nclient = ::Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Client.new\n\n# Create a client using a custom configuration\nclient = ::Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Client.new do |config|\n config.timeout = 10.0\nend\n```\n\n### #logger\n\n def logger() -\u003e Logger\n\nThe logger used for request/response debug logging. \n**Returns**\n\n- (Logger)\n\n### #report_error_event\n\n def report_error_event(request, options = nil) -\u003e ::Google::Cloud::ErrorReporting::V1beta1::ReportErrorEventResponse\n def report_error_event(project_name: nil, event: nil) -\u003e ::Google::Cloud::ErrorReporting::V1beta1::ReportErrorEventResponse\n\nReport an individual error event and record the event to a log.\n\nThis endpoint accepts **either** an OAuth token,\n**or** an [API key](https://support.google.com/cloud/answer/6158862)\nfor authentication. To use an API key, append it to the URL as the value of\na `key` parameter. For example:\n\n`POST\nhttps://clouderrorreporting.googleapis.com/v1beta1/\\{projectName}/events:report?key=123ABC456`\n\n**Note:** [Error Reporting](https://cloud.google.com/error-reporting)\nis a service built on Cloud Logging and can analyze log entries when all of\nthe following are true:\n\n- Customer-managed encryption keys (CMEK) are disabled on the log bucket.\n- The log bucket satisfies one of the following:\n - The log bucket is stored in the same project where the logs originated.\n- The logs were routed to a project, and then that project stored those logs in a log bucket that it owns. \n**Overloads** \n\n def report_error_event(request, options = nil) -\u003e ::Google::Cloud::ErrorReporting::V1beta1::ReportErrorEventResponse\n\nPass arguments to `report_error_event` via a request object, either of type [Google::Cloud::ErrorReporting::V1beta1::ReportErrorEventRequest](/ruby/docs/reference/google-cloud-error_reporting-v1beta1/latest/Google-Cloud-ErrorReporting-V1beta1-ReportErrorEventRequest \"Google::Cloud::ErrorReporting::V1beta1::ReportErrorEventRequest (class)\") or an equivalent Hash. \n**Parameters**\n\n- **request** ([::Google::Cloud::ErrorReporting::V1beta1::ReportErrorEventRequest](./Google-Cloud-ErrorReporting-V1beta1-ReportErrorEventRequest), ::Hash) --- A request object representing the call parameters. Required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash.\n- **options** (::Gapic::CallOptions, ::Hash) --- Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. \n\n def report_error_event(project_name: nil, event: nil) -\u003e ::Google::Cloud::ErrorReporting::V1beta1::ReportErrorEventResponse\n\nPass arguments to `report_error_event` via keyword arguments. Note that at least one keyword argument is required. To specify no parameters, or to keep all the default parameter values, pass an empty Hash as a request object (see above). \n**Parameters**\n\n- **project_name** (::String) --- Required. The resource name of the Google Cloud Platform project. Written as `projects/{projectId}`, where `{projectId}` is the [Google Cloud Platform project\n ID](https://support.google.com/cloud/answer/6158840).\n\n\n Example: // `projects/my-project-123`.\n- **event** ([::Google::Cloud::ErrorReporting::V1beta1::ReportedErrorEvent](./Google-Cloud-ErrorReporting-V1beta1-ReportedErrorEvent), ::Hash) --- Required. The error event to be reported. \n**Yields**\n\n- (response, operation) --- Access the result along with the RPC operation \n**Yield Parameters**\n\n- **response** ([::Google::Cloud::ErrorReporting::V1beta1::ReportErrorEventResponse](./Google-Cloud-ErrorReporting-V1beta1-ReportErrorEventResponse))\n- **operation** (::GRPC::ActiveCall::Operation) \n**Returns**\n\n- ([::Google::Cloud::ErrorReporting::V1beta1::ReportErrorEventResponse](./Google-Cloud-ErrorReporting-V1beta1-ReportErrorEventResponse)) \n**Raises**\n\n- (::Google::Cloud::Error) --- if the RPC is aborted.\n**Example**\n\nBasic example \n\n```ruby\nrequire \"google/cloud/error_reporting/v1beta1\"\n\n# Create a client object. The client can be reused for multiple calls.\nclient = Google::Cloud::ErrorReporting::V1beta1::ReportErrorsService::Client.new\n\n# Create a request. To set request fields, pass in keyword arguments.\nrequest = Google::Cloud::ErrorReporting::V1beta1::ReportErrorEventRequest.new\n\n# Call the report_error_event method.\nresult = client.report_error_event request\n\n# The returned object is of type Google::Cloud::ErrorReporting::V1beta1::ReportErrorEventResponse.\np result\n```\n\n### #universe_domain\n\n def universe_domain() -\u003e String\n\nThe effective universe domain \n**Returns**\n\n- (String)"]]