LuD1161 / stackdriver-example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stackdriver Example ✨

How to run ⚡️

  1. Install google cloud sdk
  2. Authenticate your google cloud installtion by running: gcloud auth login
  3. Create a new project and configure gcloud to use it
gcloud projects create {PROJECT_ID}
gcloud config set project {PROJECT_ID}
  1. Create a new pub/sub topic
gcloud pubsub topics create test-pub-sub-metric
  1. Publish some messages by running command many time:
gcloud pubsub topics publish test-pub-sub-metrics --message hello
  1. Generate application defalut credentinal for google client library to connect to your GCP project
gcloud auth application-default login
  1. Run your gradle project
./gradlew run 
  1. Cleanup: Delete the GCP project that we just created after experimenting!

About


Languages

Language:Java 100.0%