Instrumented everything but Python

This commit is contained in:
morganmclean 2018-07-16 11:25:10 -07:00
parent 11e68b3733
commit 99ce1f84c2
19 changed files with 952 additions and 24 deletions

View file

@ -7,6 +7,7 @@ import (
"os"
"time"
"cloud.google.com/go/profiler"
"go.opencensus.io/exporter/stackdriver"
"go.opencensus.io/plugin/ocgrpc"
"go.opencensus.io/trace"
@ -28,6 +29,16 @@ func main() {
}
port = fmt.Sprintf(":%s", port)
// Profiler initialization, best done as early as possible.
if err := profiler.Start(profiler.Config{
Service: "shippingservice",
ServiceVersion: "1.0.0",
// ProjectID must be set if not running on GCP.
// ProjectID: "my-project",
}); err != nil {
// TODO: Handle error.
}
go initTracing()
lis, err := net.Listen("tcp", port)