Skip to content

Latest commit

 

History

History
18 lines (18 loc) · 1003 Bytes

README.md

File metadata and controls

18 lines (18 loc) · 1003 Bytes

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
  4. Follow the instructions to Install the Stackdriver Logging Agent
  5. Clone the repo git clone https://github.com/GoogleCloudPlatform/java-docs-samples.git
  6. Navigate to the Stackdriver sample folder java-docs-samples/compute/stackdriver
  7. Use maven to package the class as a jar mvn clean package
  8. Switch to the target folder and execute the jar file java -jar compute-stackdriver-1.0-SNAPSHOT-jar-with-dependencies.jar
  9. On the Developer's Console, navigate to Stackdriver Error Reporting and verify that the sample error was logged.