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 (
|
|||
"os"
|
||||
"time"
|
||||
|
||||
"microservices-demo/src/internal"
|
||||
|
||||
pb "./genproto"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
|
@ -20,9 +22,10 @@ func main() {
|
|||
|
||||
conn, err := grpc.DialContext(context.TODO(),
|
||||
"127.0.0.1:"+port,
|
||||
grpc.WithInsecure(),
|
||||
grpc.WithBlock(),
|
||||
grpc.WithTimeout(time.Second*3))
|
||||
grpc.WithTimeout(time.Second*3),
|
||||
internal.DefaultDialOptions(),
|
||||
)
|
||||
if err != nil {
|
||||
log.Fatalf("probe failed: failed to connect: %+v", err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue