Skip to content

Commit

Permalink
Fix: pyroscope init
Browse files Browse the repository at this point in the history
  • Loading branch information
aopoltorzhicky committed Sep 3, 2023
1 parent 4fb965e commit 5168b26
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/api/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func newApp() *app {
runtime.SetMutexProfileFraction(5)
runtime.SetBlockProfileRate(5)

if cfg.Profiler != nil || cfg.Profiler.Server == "" {
if cfg.Profiler != nil && cfg.Profiler.Server != "" {
profiler, err := pyroscope.Start(pyroscope.Config{
ApplicationName: "bcdhub.api",
ServerAddress: cfg.Profiler.Server,
Expand Down
2 changes: 1 addition & 1 deletion cmd/indexer/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func main() {
}

var profiler *pyroscope.Profiler
if cfg.Profiler != nil || cfg.Profiler.Server == "" {
if cfg.Profiler != nil && cfg.Profiler.Server != "" {
profiler, err = pyroscope.Start(pyroscope.Config{
ApplicationName: "bcdhub.indexer",
ServerAddress: cfg.Profiler.Server,
Expand Down

0 comments on commit 5168b26

Please sign in to comment.