Overview

The Error Reporting API provides:

  • A simpleendpoint toreport errors from your running service.
  • Read access to error groups and their associated errors.

Getting started

Enable the Error Reporting API.

Roles required to enable APIs

To enable APIs, you need the Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains theserviceusage.services.enable permission.Learn how to grant roles.

Enable the API

Authorizing use of the API

Access to the Error Reporting API is controlled by Identity and Access Management roles and permissions. You can find out more about authentication and authorization for Google Cloud APIs in theAuthentication guide.

Note: API keys are associated with a project for API quota and billing purposes, but they shouldn't be used as anauthentication mechanism Instead, useservice accounts whenever possible.

Data model

The Error Reporting API defines three entities: error events, error groups, and error group stats. Theerror group stats object is the object that most users will interact with most frequently.

Error events

AnErrorEvent 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. An error event is guaranteed to be available for at least 30 days after being generated.

Error groups

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.

To update tracking issues URLs, use this resource'supdate method.

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 thegroupStats 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.

Operations

The Error Reporting API supports the following operations:

  • Report a new error event
  • List error group stats
  • List error events
  • Get error groups
  • Update an error group's tracking issues

Report error events

You can report error events from your running services by writing them toReportedErrorEvent. Doing this generatesproperly formatted error messages in Cloud Logging. The resulting log name is formatted asprojects/<PROJECT_ID>/clouderrorreporting.googleapis.com%2Freported_errors. You might incur minor Cloud Logging ingestion costs using this method; to control these costs, reviewLogs exclusions.

You can also report new error events to Error Reporting by assemblingerror event entities from your running service and sending them to theevents.report method.

List error group stats

To get a list of error group stats, send a request to thegroupStats.list method. You can pass one or morequery parameters to filter the group stats that are returned.

List error events

To get a list of error events belonging to a specific error group, send a request to theevents.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 specificservice contexts.

Get error groups

To retrieve a specific error group resource, send a request to thegroups.get method.

Update error groups

To update the tracking issue URLs associated with an error group, send an updatedErrorGroup resource to thegroups.update method.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-02-19 UTC.