refactor fix after profiler patch
Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
This commit is contained in:
parent
9486bc24fd
commit
e4664c22ea
5 changed files with 8 additions and 9 deletions
|
@ -43,9 +43,9 @@ func main() {
|
|||
// ProjectID must be set if not running on GCP.
|
||||
// ProjectID: "my-project",
|
||||
}); err != nil {
|
||||
// TODO: Handle error.
|
||||
log.Fatalf("failed to start profiler: %+v", err)
|
||||
}
|
||||
|
||||
|
||||
port := listenPort
|
||||
if os.Getenv("PORT") != "" {
|
||||
port = os.Getenv("PORT")
|
||||
|
|
|
@ -3,6 +3,7 @@ package main
|
|||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"time"
|
||||
|
@ -62,14 +63,13 @@ type frontendServer struct {
|
|||
}
|
||||
|
||||
func main() {
|
||||
// Profiler initialization, best done as early as possible.
|
||||
if err := profiler.Start(profiler.Config{
|
||||
Service: "frontendservice",
|
||||
ServiceVersion: "1.0.0",
|
||||
// ProjectID must be set if not running on GCP.
|
||||
// ProjectID: "my-project",
|
||||
}); err != nil {
|
||||
// TODO: Handle error.
|
||||
log.Fatalf("failed to start profiler: %+v", err)
|
||||
}
|
||||
|
||||
ctx := context.Background()
|
||||
|
|
|
@ -94,7 +94,7 @@ func main() {
|
|||
// ProjectID must be set if not running on GCP.
|
||||
// ProjectID: "my-project",
|
||||
}); err != nil {
|
||||
// TODO: Handle error.
|
||||
log.Fatalf("failed to start profiler: %+v", err)
|
||||
}
|
||||
|
||||
flag.Parse()
|
||||
|
|
|
@ -42,7 +42,7 @@ if __name__ == "__main__":
|
|||
try:
|
||||
googleclouddebugger.enable(
|
||||
module='recommendationserver',
|
||||
version='[VERSION]'
|
||||
version='1.0.0'
|
||||
)
|
||||
except:
|
||||
pass
|
||||
|
@ -70,4 +70,4 @@ if __name__ == "__main__":
|
|||
while True:
|
||||
time.sleep(10000)
|
||||
except KeyboardInterrupt:
|
||||
server.stop(0)
|
||||
server.stop(0)
|
||||
|
|
|
@ -29,14 +29,13 @@ 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.
|
||||
log.Fatalf("failed to start profiler: %+v", err)
|
||||
}
|
||||
|
||||
go initTracing()
|
||||
|
|
Loading…
Reference in a new issue