func main() {
// Initialize Atatus APM tracer
tracer := atatus.DefaultTracer
// Initialize the Atatus Profiler after APM
err := profiler.Start(
profiler.WithLogLevel("none"),
profiler.WithPeriod(10 * time.Second),
profiler.WithUploadTimeout(10 * time.Second),
profiler.WithProfileTypes(
profiler.CPUProfile,
profiler.GoroutineProfile,
profiler.BlockProfile,
profiler.HeapProfile,
profiler.MetricsProfile,
profiler.MutexProfile,
),
)
if err != nil {
panic(err)
}
defer profiler.Stop()
// Your application code starts here
}