Skip to content

bugtool: messages regarding gops #5308

Description

@kkourt

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")
      }

Metadata

Metadata

Labels

Type

No type

Projects

Status
No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions