add OpenCensus Go support for HTTP and gRPC

This commit is contained in:
JBD 2018-07-10 17:36:55 -07:00
parent 7101b6b4fe
commit 4a82b21b5e
8 changed files with 65 additions and 24 deletions

View file

@ -6,6 +6,8 @@ import (
"net"
"os"
"microservices-demo/src/internal"
"golang.org/x/net/context"
"google.golang.org/grpc"
"google.golang.org/grpc/reflection"
@ -70,7 +72,7 @@ func main() {
if err != nil {
log.Fatalf("failed to listen: %v", err)
}
s := grpc.NewServer()
s := grpc.NewServer(internal.DefaultServerOptions()...)
pb.RegisterShippingServiceServer(s, &server{})
log.Printf("Shipping Service listening on port %s", port)