A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://cloud.google.com/error-reporting/docs/setup/ec2 below:

Setting up Error Reporting on Amazon EC2

Skip to main content Setting up Error Reporting on Amazon EC2

Stay organized with collections Save and categorize content based on your preferences.

You can send errors from your EC2 applications to Error Reporting in one of two ways:

Using Logging to report errors

To connect your EC2 applications to Error Reporting, send your exceptions or other errors to Logging.

For example:

  1. Connect the Amazon Web Services (AWS) system to Google Cloud. For more information, see Installing the Logging Agent on individual VMs.
  2. Install the Logging google-fluentd agent as is appropriate for your environment. For instructions, see Installing the Logging agent.
  3. Modify your application so that it logs exceptions and their stack traces to Logging.

    You must include all the information for a single error or exception in the same log entry, including all the frames of any stack trace. If all the information isn't together, then Error Reporting might not detect the error. You can use the structured JSON format for your log entry payloads to include different kinds of information for each error.

  4. Java

    Add the following to your pom.xml file:

    Then use code like the following to send the exception data:

    Python

    First, install the fluent-logger-python library:

    sudo pip install fluent-logger
    

    Then use code like the following to send the exception data:

    Node.js

    First, install the fluent-logger-node library:

    npm install fluent-logger
    

    Then use code like the following to send the exception data:

    Go

    First, install the fluent-logger-golang package:

    go get github.com/fluent/fluent-logger-golang/
    

    Then use code like the following to send error data:

    Using the Error Reporting API to write errors

    The Error Reporting API provides a report endpoint for writing error information to the service.

    1. Enable the Error Reporting API.

      Enable the API

    2. Report errors to the API using either the REST API or a client library.

    Samples ASP.NET

    The ASP.NET NuGet package reports uncaught exceptions from ASP.NET web applications to Error Reporting.

    Install the NuGet package

    To install the Stackdriver ASP.NET NuGet package in Visual Studio:

    1. Right-click your solution and select Manage NuGet packages for solution.
    2. Select the Include prerelease checkbox.
    3. Search for and install the package named Google.Cloud.Diagnostics.AspNet.
    Usage

    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:

    Go

    See Setting up Error Reporting for Go.

    Java

    See Setting up Error Reporting for Java.

    Node.js

    See Setting up Error Reporting for Node.js.

    Ruby

    See Setting up Error Reporting for Ruby.

    Python

    See Setting up Error Reporting for Python.

    PHP

    See Setting up Error Reporting for PHP.

    View error groups

    In the Google Cloud console, go to the Error Reporting page:

    Go to Error Reporting

    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."],[[["EC2 applications can send errors to Error Reporting by either logging to Cloud Logging or using the Error Reporting API."],["When using Cloud Logging, ensure log entries are formatted correctly so they are recognizable by Error Reporting and contain all necessary information within the same log entry."],["The Error Reporting API allows applications to send HTTP requests directly, and client libraries are available for several languages such as ASP.NET, Go, Java, Node.js, Ruby, Python, and PHP."],["To use Cloud Logging, the AWS system needs to be connected to Google Cloud, the Logging agent must be installed, and the application must log exceptions with stack traces."],["To use the Error Reporting API, the API needs to be enabled and you can use either the REST API or one of the client libraries to report the errors."]]],[]]


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