INNER CODE UNIT · Go
periodicStackTraces
werf/nelm · cmd/nelm/main.go:31
func periodicStackTraces() {
go func() {
for {
buf := make([]byte, 1<<20)
runtime.Stack(buf, true)
fmt.Printf("%s", buf)
time.Sleep(time.Second * time.Duration(10))
}
}()
}
func main() {
if featgate.FeatGatePeriodicStackTraces.Enabled() {
periodicStackTraces()
}
ctx := logboek.NewContext(context.Background(), logboek.DefaultLogger())