Stay organized with collections Save and categorize content based on your preferences.
You can send errors from your Google Kubernetes Engine applications to Error Reporting in one of two ways:
By logging to Cloud Logging. If you're already using Cloud Logging, the only additional requirement is that your log entries be recognizable by Error Reporting. For more information on error formatting requirements, read Formatting errors in Cloud Logging.
Using the Error Reporting API. Your application can send HTTP requests using the REST API, or can make use of experimental libraries in several languages.
GKE's default logging agent provides a managed solution to deploy and manage the agents that send the logs for your clusters to Cloud Logging. The structure of the agent depends on the version of the cluster. For information about this agent, see Managing GKE logs.
Error Reporting requires that exceptions or stack traces be contained in a single log entry. Most logging agents are capable of recognizing that several log lines—stack frames printed each on a new line—represent a stack trace and send it to Cloud Logging as a single log entry. If the agent isn't capable of reconstructing multiple lines as a single error, then use the projects.events.report
API endpoint, which allows you to control the contents of an error.
The Error Reporting API provides a report
endpoint for writing error information to the service.
Enable the Error Reporting API.
Report errors to the API using either the REST API or a client library.
The ASP.NET NuGet package reports uncaught exceptions from ASP.NET web applications to Error Reporting.
Install the NuGet packageTo install the Stackdriver ASP.NET NuGet package in Visual Studio:
Google.Cloud.Diagnostics.AspNet
.Once you've installed the Stackdriver ASP.NET NuGet package, add the following statement to your application code to start sending errors to Stackdriver:
using Google.Cloud.Diagnostics.AspNet;
Add the following HttpConfiguration
code to the Register
method of your .NET web app (replacing your-project-id
with your actual project ID to enable the reporting of exceptions:
Once you've added this method to your ASP.NET application, you can view any uncaught exceptions that occur as they get reported to Google Cloud in the Error Reporting section of the Google Cloud console.
C#The following example can be found in the GoogleCloudPlatform/dotnet-docs-samples repo. To use it, after building the project, specify your project ID:
C:\...\bin\Debug> set GOOGLE_PROJECT_ID=[YOUR_PROJECT_ID]
Make sure to replace [YOUR_PROJECT_ID]
with the correct value from the Google Cloud console.
Then, send exception data with code similar to the following:
GoSee Setting up Error Reporting for Go.
JavaSee Setting up Error Reporting for Java.
Node.jsSee Setting up Error Reporting for Node.js.
RubySee Setting up Error Reporting for Ruby.
PythonSee Setting up Error Reporting for Python.
PHPSee Setting up Error Reporting for PHP.
View error groupsIn the Google Cloud console, go to the Error Reporting page:
You can also find this page by using the search bar.
Note: If you see the message "Set up Error Reporting" on the Error Reporting page, then your Google Cloud project has no error groups to display.Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-11 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-11 UTC."],[[["GKE applications can send errors to Error Reporting through Cloud Logging or by using the Error Reporting API."],["When using Cloud Logging, ensure that log entries containing exceptions or stack traces are formatted as single log entries for proper recognition by Error Reporting."],["The Error Reporting API allows error reporting via REST API calls or through experimental client libraries available in various languages such as ASP.NET, Go, Java, Node.js, Ruby, Python, and PHP."],["The Error Reporting API provides a `report` endpoint, and client libraries such as the ASP.NET NuGet package, include specific setup instructions within their documentation to integrate with the service."],["The Error Reporting page in the Google Cloud console allows users to view reported error groups and requires prior setup to function properly."]]],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4