events
Creates, updates, deletes, gets or lists an events
resource.
Overview
Name | events |
Type | Resource |
Id | google.clouderrorreporting.events |
Fields
The following fields are returned by SELECT
queries:
- list
Successful response
Name | Datatype | Description |
---|---|---|
context | object | Data about the context in which the error occurred. (id: ErrorContext) |
eventTime | string (google-datetime) | Time when the event occurred as provided in the error report. If the report did not contain a timestamp, the time the error was received by the Error Reporting system is used. |
message | string | The stack trace that was reported or logged by the service. |
serviceContext | object | Describes a running service that sends errors. Its version changes over time and multiple versions can run in parallel. (id: ServiceContext) |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
list | select | projectsId , locationsId | groupId , serviceFilter.service , serviceFilter.version , serviceFilter.resourceType , timeRange.period , pageSize , pageToken | Lists the specified events. |
delete_events | delete | projectsId , locationsId | Deletes all error events of a given project. | |
report | exec | projectsId | 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] (https://cloud.google.com/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. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
locationsId | string | |
projectsId | string | |
groupId | string | |
pageSize | integer (int32) | |
pageToken | string | |
serviceFilter.resourceType | string | |
serviceFilter.service | string | |
serviceFilter.version | string | |
timeRange.period | string |
SELECT
examples
- list
Lists the specified events.
SELECT
context,
eventTime,
message,
serviceContext
FROM google.clouderrorreporting.events
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND groupId = '{{ groupId }}'
AND serviceFilter.service = '{{ serviceFilter.service }}'
AND serviceFilter.version = '{{ serviceFilter.version }}'
AND serviceFilter.resourceType = '{{ serviceFilter.resourceType }}'
AND timeRange.period = '{{ timeRange.period }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}';
DELETE
examples
- delete_events
Deletes all error events of a given project.
DELETE FROM google.clouderrorreporting.events
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required;
Lifecycle Methods
- report
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] (https://cloud.google.com/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.
EXEC google.clouderrorreporting.events.report
@projectsId='{{ projectsId }}' --required
@@json=
'{
"eventTime": "{{ eventTime }}",
"serviceContext": "{{ serviceContext }}",
"message": "{{ message }}",
"context": "{{ context }}"
}';