The Stackdriver Error Reporting API provides:
- A simple endpoint to report errors from your running service.
- Read access to error groups and their associated errors.
Enable the API
Enable the Stackdriver Error Reporting API.
The Error Reporting API defines three entities: error events, error groups, and error group stats. The error group stats object is the object that most users will interact with most frequently.
ErrorEvent represents a single occurrence of an error in your application. The object contains information about the error, such as the time at which it occurred, the context in which it occurred, and the error message that was returned.
ErrorGroup objects are logically-grouped collections of error events. Grouping is based on information in the error event's stack trace. An error group is a simple object containing only the name, group ID, and any associated tracking issues for the group.
Use this resource's
update method to update tracking issue URLs.
Error group stats
ErrorGroupStats objects contain detailed information about an error group, and are the API objects that you will interact with most frequently. Information in the
groupStats object includes the first and last time an error event in this group occurred, the count, the number of affected users, and more. This object is useful when building widgets and custom dashboards.
The Error Reporting API supports:
- Reporting a new error event.
- List error group stats.
- List error events.
- Get error groups.
- Update a group's tracking issues.
Report error events
You can report new error events to Stackdriver Error Reporting by assembling error event entities from your running service and sending them to the
List error group stats
List error events
You can get a list of error events belonging to a specific error group by sending a request to the
events.list method. You can pass a filter condition to these requests to retrieve only those error events that occurred between a specific start and end time, or those that match specific service contexts.
Get error groups
Retrieve a specific error group resource by sending a request to the