Reference documentation and code samples for the Error Reporting API module Google::Cloud.
Methods
.error_reporting
def
self
.
error_reporting
(
project_id
=
nil
,
credentials
=
nil
,
scope
:
nil
,
timeout
:
nil
)
-
>
Google
::
Cloud
::
ErrorReporting
::
Project
Create a new object for connecting to the Error Reporting service. Each call creates a new connection.
For more information on connecting to Google Cloud see the Authentication Guide .
- project_id(String) — Google Cloud Platform project identifier for the Error Reporting service you are connecting to. If not present, the default project for the credentials is used.
- credentials(String, Hash, Google::Auth::Credentials) — The path to the keyfile as a String, the contents of the keyfile as a Hash, or a Google::Auth::Credentials object. (See ErrorReporting::Credentials )
- scope(String, Array<String>) (defaults to: nil)
—
The OAuth 2.0 scopes controlling the set of resources and operations that the connection can access. See Using OAuth 2.0 to Access Google APIs .
The default scope is:
-
https://www.googleapis.com/auth/cloud-platform
-
- timeout(Integer) (defaults to: nil) — Default timeout to use in requests. Optional.
require "google/cloud/error_reporting" error_reporting = Google :: Cloud . error_reporting "GCP_Project_ID" , "/path/to/gcp/secretkey.json" error_event = error_reporting . error_event "Error with Backtrace" , event_time : Time . now , service_name : "my_app_name" , service_version : "v8" error_reporting . report error_event
#error_reporting
def
error_reporting
(
scope
:
nil
,
timeout
:
nil
)
-
>
Google
::
Cloud
::
ErrorReporting
::
Project
Create a new object for connecting to the Error Reporting service. Each call creates a new connection.
For more information on connecting to Google Cloud see the Authentication Guide .
- scope(String, Array<String>) (defaults to: nil)
—
The OAuth 2.0 scopes controlling the set of resources and operations that the connection can access. See Using OAuth 2.0 to Access Google APIs .
The default scope is:
-
https://www.googleapis.com/auth/cloud-platform
-
- timeout(Integer) (defaults to: nil) — Default timeout to use in requests. Optional.
require "google/cloud/error_reporting" gcloud = Google :: Cloud . new "GCP_Project_ID" , "/path/to/gcp/secretkey.json" error_reporting = gcloud . error_reporting error_event = error_reporting . error_event "Error with Backtrace" , event_time : Time . now , service_name : "my_app_name" , service_version : "v8" error_reporting . report error_event