github.com/blend/go-sdk@v1.20240719.1/datadog/use_profiling.go (about)

     1  /*
     2  
     3  Copyright (c) 2024 - Present. Blend Labs, Inc. All rights reserved
     4  Use of this source code is governed by a MIT license that can be found in the LICENSE file.
     5  
     6  */
     7  
     8  package datadog
     9  
    10  // UseProfiler returns if profiling is enabled and the profiler address is configured.
    11  //
    12  // It should be used to gate if you should create a profiler with `profiler.Start`.
    13  func UseProfiler(cfg Config) bool {
    14  	return cfg.ProfilingEnabledOrDefault() && cfg.GetProfilerAddress() != ""
    15  }