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/compute/error-reporting at master · Albertoimpl/java-docs-samples

Expand file tree

/

error-reporting

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
 
 
/

error-reporting

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
src/main/java/com/example/compute/errorreporting
src/main/java/com/example/compute/errorreporting
 
 
README.md
README.md
 
 
pom.xml
pom.xml
 
 

README.md

Outline

Stackdriver sample for Google Compute Engine

This sample demonstrates how to use Stackdriver on Google Compute Engine

Running on Compute Engine

  1. Create a compute instance on the Google Cloud Platform Developer's Console

  2. SSH into the instance you created

  3. Update packages and install required packages sudo apt-get update && sudo apt-get install git-core openjdk-8-jdk maven

  4. Follow the instructions to Install the Stackdriver Logging Agent

  5. Create /etc/google-fluentd/config.d/forward.conf and add

    <source>
      type forward
      port 24224
    </source>
  6. Restart the logging agent

    sudo service google-fluentd restart

  7. Clone the repo

    git clone https://github.com/GoogleCloudPlatform/java-docs-samples.git

  8. Navigate to the Stackdriver sample folder

    java-docs-samples/compute/stackdriver

  9. Make sure that openjdk 8 is the selected java version

    sudo update-alternatives --config java

  10. Use maven to package the class as a jar

    mvn clean package

  11. Switch to the target folder and execute the jar file

    java -jar compute-stackdriver-1.0-SNAPSHOT-jar-with-dependencies.jar

  12. On the Developer's Console, navigate to Stackdriver Error Reporting and verify that the sample error was logged.

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.