From 4fb965e0321d116291af2a7830ce12895d8c11e2 Mon Sep 17 00:00:00 2001 From: Artem Date: Sun, 3 Sep 2023 17:44:24 +0400 Subject: [PATCH] Fix: pyroscope init --- cmd/api/main.go | 2 +- cmd/indexer/main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/api/main.go b/cmd/api/main.go index f3b7c4bac..589067451 100644 --- a/cmd/api/main.go +++ b/cmd/api/main.go @@ -52,7 +52,7 @@ func newApp() *app { runtime.SetMutexProfileFraction(5) runtime.SetBlockProfileRate(5) - if cfg.Profiler != nil { + if cfg.Profiler != nil || cfg.Profiler.Server == "" { profiler, err := pyroscope.Start(pyroscope.Config{ ApplicationName: "bcdhub.api", ServerAddress: cfg.Profiler.Server, diff --git a/cmd/indexer/main.go b/cmd/indexer/main.go index f01a02a4a..8ce114458 100644 --- a/cmd/indexer/main.go +++ b/cmd/indexer/main.go @@ -28,7 +28,7 @@ func main() { } var profiler *pyroscope.Profiler - if cfg.Profiler != nil { + if cfg.Profiler != nil || cfg.Profiler.Server == "" { profiler, err = pyroscope.Start(pyroscope.Config{ ApplicationName: "bcdhub.indexer", ServerAddress: cfg.Profiler.Server,