Adds option to disable Stackdriver Export (#293)

This commit is contained in:
Megan O'Keefe 2020-02-20 15:26:44 -05:00 committed by GitHub
parent 595bd21d38
commit 90f9287f3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 267 additions and 75 deletions

View file

@ -94,8 +94,19 @@ func main() {
}
log.Out = os.Stdout
go initProfiling(log, "frontend", "1.0.0")
go initTracing(log)
if os.Getenv("DISABLE_TRACING") == "" {
log.Info("Tracing enabled.")
go initTracing(log)
} else {
log.Info("Tracing disabled.")
}
if os.Getenv("DISABLE_PROFILER") == "" {
log.Info("Profiling enabled.")
go initProfiling(log, "frontend", "1.0.0")
} else {
log.Info("Profiling disabled.")
}
srvPort := port
if os.Getenv("PORT") != "" {