add OpenCensus Go support for HTTP and gRPC
This commit is contained in:
parent
7101b6b4fe
commit
4a82b21b5e
8 changed files with 65 additions and 24 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue