...

Text file src/go.opencensus.io/examples/grpc/README.md

Documentation: go.opencensus.io/examples/grpc

     1# Example gRPC server and client with OpenCensus
     2
     3This example uses:
     4
     5* gRPC to create an RPC server and client.
     6* The OpenCensus gRPC plugin to instrument the RPC server and client.
     7* Debugging exporters to print stats and traces to stdout.
     8
     9```
    10$ go get go.opencensus.io/examples/grpc/...
    11```
    12
    13First, run the server:
    14
    15```
    16$ go run $(go env GOPATH)/src/go.opencensus.io/examples/grpc/helloworld_server/main.go
    17```
    18
    19Then, run the client:
    20
    21```
    22$ go run $(go env GOPATH)/src/go.opencensus.io/examples/grpc/helloworld_client/main.go
    23```
    24
    25You will see traces and stats exported on the stdout. You can use one of the
    26[exporters](https://godoc.org/go.opencensus.io/exporter)
    27to upload collected data to the backend of your choice.
    28
    29You can also see the z-pages provided from the server:
    30* Traces: http://localhost:8081/debug/tracez
    31* RPCs: http://localhost:8081/debug/rpcz

View as plain text