Running bugtool on a tetragon agent using default flags results in:
level=info msg="Skipping gops dump info as daemon is running without gops, use --gops-address to enable gops"
level=info msg="Skipping gops dump info as daemon is running without gops, use --gops-address to enable gops"
level=info msg="Successfully dumped gops pprof" profile=cpu
level=info msg="Skipping gops dump info as daemon is running without gops, use --gops-address to enable gops"
level=info msg="Successfully dumped gops pprof" profile=heap
There are two potential improvements here:
- Only output the "Skipping gops" message once
- The "Successfully dumped ..." messages are inaccurate. See:
|
if s.info.GopsAddr == "" { |
|
s.multiLog.Info("Skipping gops dump info as daemon is running without gops, use --gops-address to enable gops") |
|
return nil |
|
} |
|
if err != nil { |
|
s.multiLog. |
|
WithField("profile", name). |
|
WithError(err). |
|
Warn("Failed to dump gops pprof") |
|
} else { |
|
s.multiLog. |
|
WithField("profile", name). |
|
Info("Successfully dumped gops pprof") |
|
} |
Running bugtool on a tetragon agent using default flags results in:
There are two potential improvements here:
tetragon/pkg/bugtool/bugtool.go
Lines 598 to 601 in 02adb23
tetragon/pkg/bugtool/bugtool.go
Lines 633 to 642 in 02adb23