Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce resource log level #1622

Merged
merged 3 commits into from
Jun 15, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions utils/resource/usage.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,9 @@ func (m *manager) update(diskPath string, frequency, cpuHalflife, diskHalflife t

availableBytes, getBytesErr := storage.AvailableBytes(diskPath)
if getBytesErr != nil {
m.log.Debug("failed to lookup resource",
m.log.Verbo("failed to lookup resource",
zap.String("resource", "system disk"),
zap.String("path", diskPath),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to include the path here as well because I was initially confused why I was also seeing this error (was running with --db-type=memdb)

zap.Error(getBytesErr),
)
}
Expand Down Expand Up @@ -259,7 +260,7 @@ func (p *proc) getActiveUsage(secondsSinceLastUpdate float64) (float64, float64,
// assume that the utilization is 0.
times, err := p.p.Times()
if err != nil {
p.log.Debug("failed to lookup resource",
p.log.Verbo("failed to lookup resource",
zap.String("resource", "process CPU"),
zap.Int32("pid", p.p.Pid),
zap.Error(err),
Expand All @@ -271,7 +272,7 @@ func (p *proc) getActiveUsage(secondsSinceLastUpdate float64) (float64, float64,
// an error on macos.
io, err := p.p.IOCounters()
if err != nil {
p.log.Debug("failed to lookup resource",
p.log.Verbo("failed to lookup resource",
zap.String("resource", "process IO"),
zap.Int32("pid", p.p.Pid),
zap.Error(err),
Expand Down