Prepare and test your skills
Prepare and test your skills
Lifecycle management and incident response in Error Reporting (opens in a new tab) is the workflow that moves an error from first detection to resolved fix. Error events flow from applications to Cloud Logging and then to Error Reporting, or directly from client libraries to the Error Reporting API. The Error Reporting dashboard in the Google Cloud console is the central place where each error group moves from first seen to triaged to resolved, which shortens time-to-recovery because related crashes are handled once.
An error group in Error Reporting is a collection of individual error events that share the same root cause. The Error Reporting page lists these groups to show application health, recurrence trends, and which failures need attention first. Each row in the list shows diagnostic signals for triage:
If the page shows the message "Set up Error Reporting," the project has no error groups to display. Viewing the list requires the Error Reporting Viewer role (roles/errorreporting.viewer) on the project.
Error group details in Error Reporting are the history and evidence for one root cause, including event history, resolution status, occurrence count, and timestamped samples. To open the details, go to the Error Reporting page in the Google Cloud console and click the error name to open the Error Group Details page. Each entry in the timestamped list contains a link to relevant logs and, when available, a stack trace. Teams use this history to confirm whether a fix stopped new occurrences or whether the same group is still recurring.
Tracing in Error Reporting connects an error group sample to the exact log entry stored in Cloud Logging for deeper diagnosis. From the Recent samples pane on the details page, click View Logs to open Logs Explorer filtered to that group. The query-editor field specifies the group with a filter such as errorGroups.id="ERROR_GROUP_ID", where the ID identifies the selected error group. Only log entries stored in a log bucket can include the errorGroups field, and the value is populated by the log-bucket destination, while log data only sent to a project or routed by log sinks does not contain it. In Logs Explorer, the Error group button marks a log entry that is associated with a group, and clicking the button returns to the error group view.
Filtering in Error Reporting narrows the dashboard list so responders focus on the most urgent resources, regions, or error text first. The toolbar filters groups by status, affected resources, and the region of the log buckets that store the log entries. To filter by resource, select the All Resources menu, select a resource, and apply any additional label filters, such as service and then version for Kubernetes Container Services. To filter by text, enter a value in the Filter errors field, and to clear resource filters, select Reset and then Apply.
Error capture in Error Reporting determines whether a crash will appear as a group that can be tracked and resolved. Applications on integrated services can have errors inferred automatically from Cloud Logging, while applications that need direct control send events through a client library such as the Error Reporting package for Java (opens in a new tab). The correct capture path depends on log ownership and encryption:
| Capture path | When it applies | Requirements supported by the documentation |
|---|---|---|
| Automatic inference from Cloud Logging | Application runs on Cloud Run functions, App Engine, Compute Engine (opens in a new tab), or Google Kubernetes Engine | Log entries follow error formatting requirements and are stored in a non-CMEK log bucket owned by the originating project or by the destination project that received routed logs |
| Direct reporting with client library | Custom error events are needed or the log bucket uses customer-managed encryption keys (CMEK) | Application calls the library or projects.events.report API to create error groups, including with the Error Reporting library for Node.js (opens in a new tab) and the Error Reporting library for Ruby (opens in a new tab) |
Direct reporting keeps the lifecycle complete when automatic inference cannot read the bucket, such as when the bucket uses CMEK. Proper formatting still matters because a single error or exception, including all stack-trace frames, must be contained in the same log entry for Error Reporting to detect it.
Exam tip: Use automatic inference from Cloud Logging for standard logs in a non-CMEK bucket owned by the originating or destination project, and use a client library when the bucket uses CMEK or when reporting custom error events.
Implementation of Error Reporting Mechanisms is the setup that gets application crashes and exceptions from running code into Google Cloud Error Reporting for centralized analysis. Applications can send error events directly with a language-specific client library, or Error Reporting can infer error events automatically from log entries written to Cloud Logging. The correct path depends on encryption, log routing, and whether custom error events are needed, but both paths require correctly formatted stack traces.
Choosing a reporting path in Error Reporting (opens in a new tab) means deciding between direct reporting with a client library and automatic inference from Cloud Logging. Direct reporting sends events through the Error Reporting API even when logs cannot be read automatically, while log-based inference requires no extra code when the environment and log format meet specific conditions.
| Reporting path | How errors travel | Choose when |
|---|---|---|
| Direct with client library | Application calls Error Reporting API through language library | Log bucket uses customer-managed encryption keys (CMEK), or custom error events are needed |
| Automatic from Cloud Logging | Application writes logs to Cloud Logging, Error Reporting reads them | App runs on an integrated service with a non-CMEK bucket owned by the originating or destination project and correctly formatted logs |
Direct reporting continues to work on integrated services, so an application that needs CMEK support or custom events should use a client library even when automatic inference is available.
Sending errors with client libraries means instrumenting Java, Python, or Node.js code with the Error Reporting library for that language so the application reports exceptions and messages directly. The Error Reporting package for Java (opens in a new tab), the Error Reporting library for Node.js (opens in a new tab), and the Python, Ruby, and other libraries all create error groups from the reported events, which lets teams diagnose runtime crashes without depending on log parsing. Local development with these libraries depends on Application Default Credentials, typically created with gcloud auth application-default login, while the projects.events.report method also supports API keys without a credentials file.
Use a client library to create error groups for the following cases:
Capturing errors automatically from Cloud Logging means Error Reporting reads qualifying log entries and groups them without added reporting code. This automatic inference works for applications running on integrated Google Cloud services when log entries follow the error formatting requirements and are stored in a non-CMEK log bucket owned by the originating project or by the destination project to which the logs were routed. Because no client library is involved, correct log structure is what makes the error visible for centralized analysis.
Automatic inference from logs is supported on the following integrated services:
Exam tip: A log bucket with customer-managed encryption keys (CMEK) blocks automatic inference from Cloud Logging, so use a language-specific client library to report those errors directly.
Formatting logs so stack traces are recognized means placing all information for one error or exception into the same log entry in a structure Error Reporting can parse. The single log entry must include the exception message and all frames of the stack trace, because split entries may not be detected as an error. Applications can use a structured JSON payload to carry the message, service context such as service name, and additional metadata together. On Compute Engine (opens in a new tab), this formatting is paired with an agent that collects the log file and applies the correct parser.
Collecting errors on Compute Engine means streaming application exceptions to Cloud Logging with the Ops Agent or calling the Error Reporting API directly. The Ops Agent is the supported collection path, while the legacy Logging agent based on google-fluentd reached end of support on September 28, 2026 and should be replaced with a supported alternative. For custom applications, the Ops Agent uses a logging receiver that points to the log files plus a parse_multiline processor for plain-text stack traces across multiple lines or a parse_json processor for JSON-string logs, while supported third-party applications use pre-configured receivers that already produce a recognized format.
Setting up the Ops Agent for Error Reporting follows an ordered flow:
parse_multiline for multiline text or parse_json for JSON, so multiline stack traces stay together.Reviewing errors in centralized analysis means opening the Error Reporting page in the Google Cloud console to work with grouped errors from all reporting paths. The Error Reporting library for Ruby (opens in a new tab) and other direct paths feed the same central view as automatic log inference. The Error Reporting page lists error groups with diagnostic details such as error name, resolution status, HTTP response codes, and occurrences over time, and selecting an error name opens group details with history, occurrence counts, and timestamped samples. Each sample links to relevant logs and shows a stack trace when available, and the View Logs action opens Logs Explorer filtered by errorGroups.id for that group. Only log entries stored in a log bucket carry the errorGroups field, so routed log data that is not stored in a bucket will not include that link.
Error Reporting (opens in a new tab) is the Google Cloud service that turns many individual error events into a small set of error groups, where each group represents one unique software defect. An error event is a single crash or exception at a point in time, while an error group collects all recurring instances that share the same root cause. This grouping lets teams see whether they face many different bugs or one bug happening many times, and then prioritize fixes by frequency and impact.
Error group logic in Error Reporting aggregates error events by their root cause instead of listing every log line separately. The service interprets exception data, including the error name, message, and stack trace pattern, to decide which events belong together in the same group. Each group then tracks its number of occurrences over time, its resolution status, and its history of timestamped samples. When new events match an existing pattern, the occurrence count for that group grows rather than creating a new group.
Error data flows into Error Reporting through two paths: automatic inference from logs and direct reporting through libraries or the API. Automatic inference reads exceptions that applications write to Cloud Logging, while direct reporting sends events to the Error Reporting API from instrumented code. The path that works depends on where logs are stored and how they are encrypted.
| Reporting path | Source of error data | Choose when |
|---|---|---|
| Automatic inference from Cloud Logging | Log entries written by apps on Cloud Run functions, App Engine, Compute Engine, and Google Kubernetes Engine (GKE) | Log entries follow the required error format and are stored in a non-CMEK log bucket owned by the originating project or by the destination project that received routed logs |
| Direct reporting with client libraries or API | Calls from the Error Reporting package for Java (opens in a new tab), Python, Node.js, Ruby, and other libraries to the projects.events.report method | The log bucket uses customer-managed encryption keys (CMEK), custom error events are needed, or automatic inference cannot see the logs |
Direct reporting bypasses the log-bucket dependency because data flows from the application code straight to Error Reporting. Automatic inference depends on Cloud Logging, so the log bucket location and encryption control whether grouping can happen without a library.
Complete exception data is the set of fields that lets Error Reporting recognize the root cause, and the most important part is a full stack trace stored in a single log entry. The log entry must contain the exception message plus all frames of the stack trace together, and structured JSON format can carry the message, service context, and extra metadata in one payload. If frames are split across multiple log entries, Error Reporting might not detect the error or might group it incorrectly. Consistent formatting therefore decides whether recurring instances are counted together as one defect.
For custom applications on Compute Engine (opens in a new tab), the Ops Agent collects log files and formats them before data flows from the agent to Cloud Logging and then to Error Reporting. Setup follows an ordered workflow:
parse_multiline processor for plain-text stack traces across multiple lines or a parse_json processor for JSON-string logs; supported third-party apps can use pre-configured receivers that already parse correctly.The Error Reporting page is the list view where each row is one error group with signals for triage. Each group shows diagnostic details such as the error name, resolution status, HTTP response code, and occurrences over time, which reveal application health and recurrence trends. Opening an error name loads the Error Group Details page, which shows the event history, total occurrence count, resolution status, and a timestamped list of recent samples. Each sample links to relevant logs and, when available, shows the stack trace that explains the failure pattern.
Prioritization focuses on defects with rising occurrence counts, persistent failures across recent samples, and critical HTTP codes or service impact. Resolution status separates new and reopened defects from resolved ones, so attention stays on active problems. Because one group can represent hundreds of identical crashes, fixing the shared root cause identified by the stack trace pattern resolves all of its recurring instances at once.
Exam tip: Events with the same stack trace pattern count as recurring instances of one error group, while a different root cause creates a separate group; a split or incomplete stack trace can prevent correct detection and grouping.
Filtering in Error Reporting narrows the group list so analysis starts with the right service, time, and failure type. The toolbar filters groups by several peer dimensions, and each filter reduces the list to matching defects, including setup with the Error Reporting library for Node.js (opens in a new tab) and the Error Reporting library for Ruby (opens in a new tab):
Tracing moves from a group to its proof in Logs Explorer. The Recent samples pane on the details page provides a View Logs action, which opens Logs Explorer with a query on errorGroups.id for that group. Only log entries stored in a log bucket carry the errorGroups field populated by the log-bucket destination, and the Error group button in Logs Explorer marks entries tied to a group and links back to it. This two-way link connects the grouped defect to the original log entries that produced it.
An error group in Google Cloud Error Reporting is a collection of individual error events that share the same root cause, identified by error name, message, and stack trace pattern. The Error Reporting dashboard lists these groups with error names, resolution statuses, HTTP response codes, and occurrences over time, so related crashes are triaged and resolved once to shorten time-to-recovery.
Use direct reporting with a client library in Google Cloud Error Reporting when the log bucket uses customer-managed encryption keys (CMEK) or when custom error events are needed. Automatic inference from Cloud Logging applies when the application runs on Cloud Run functions, App Engine, Compute Engine, or Google Kubernetes Engine (GKE) with correctly formatted logs stored in a non-CMEK log bucket owned by the originating project or by the destination project that received routed logs.
From the Recent samples pane on the Error Group Details page, select View Logs to open Logs Explorer filtered to that group by its error groups identifier. Only log entries stored in a log bucket carry the errorGroups field populated by the log-bucket destination, and the Error group button in Logs Explorer marks an associated entry and returns to the error group view.
Last updated