http

module
v0.32.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 15, 2022 License: Apache-2.0

README

HTTP Client-Server example

An HTTP server and client instrumented to send traces to Google Cloud Trace.

In order to run this example, you'll need to

  1. Create a GCP project
  2. Enable billing
  3. Enable the Cloud Trace API
  4. Obtain authentication credentials
    • If you run the code on GCE/GKE/Cloud Run, it will receive the necessary authentication credentials automatically.
    • If you run in Cloud Shell or outside of GCP, you'll need to have it authenticate as a service account.
  5. In one terminal, run the server
    $ go run ./server
    
  6. In another terminal on the same host, run the client
    $ go run ./client
    
  7. Open Google Cloud Trace and examine the trace that was recorded. ./cloudtrace.png

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL