GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — java-docs-samples/flexible/errorreporting at master · riburk/java-docs-samples

Expand file tree

/

errorreporting

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
 
 
/

errorreporting

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
src/main
src/main
 
 
README.md
README.md
 
 
pom.xml
pom.xml
 
 

README.md

Outline

Error reporting sample for Google App Engine Flexible

Open in Cloud Shell

Stackdriver Error Reporting Stackdriver Error Reporting counts, analyzes and aggregates the crashes in your running cloud services. A centralized error management interface displays the results with sorting and filtering capabilities.

This sample Java application demonstrates how errors are automatically sent to Error reporting in applications running in App Engine Flex environment. It also demonstrates how to send custom error events using the Error Reporting API.

Setup

  1. Install Maven.
  2. Install and initialize GCloud SDK.
  3. Enable Stack Driver Error Reporting API. (Note : only required for logging custom events using the Error Reporting API)

Build

Build your project with:

	mvn clean package

Local testing

Create a service account and set the GOOGLE_APPLICATION_CREDENTIALS environment variable.

For local testing, we will be using the Jetty Maven plugin. Run:

   mvn jetty:run

Access http://localhost:8080/error endpoint.

After accessing the /error endpoint, check the error reporting console. Confirm that you see the custom error reported using the error reporting API.

Deploy

Run:

   mvn appengine:deploy

Access [https://YOUR_PROJECT_ID.appspot.com/error] endpoint.

After accessing the /error endpoint, check the error reporting console. Confirm that you see:

  1. IllegalArgumentException logged via the standard logging framework.
  2. Custom error reported using the error reporting API.
  3. Runtime exception.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.