Skip to content

Commit e9c03c8

Browse files
chore(logging): move container errors to info (#2010)
* if the host doesn't have container environment, we should not raise a warning
1 parent e9ea741 commit e9c03c8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pkg/metrics/containerd_sampler.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ var (
2121
cslog = log.WithComponent("ContainerdSampler") //nolint:gochecknoglobals
2222

2323
errContainerdSampler = errors.New("containerd sampler")
24-
errInitializeContainerd = errors.New("unable to initialize containerd client, could be not installed on the host")
24+
errInitializeContainerd = errors.New("unable to initialize containerd client, maybe it is not installed on the host")
2525
errCannotGetPids = errors.New("unable to get pids for container")
2626
errCannotGetTask = errors.New("unable to get task for container")
2727
errCannotGetContainerInfo = errors.New("unable to get container info")
@@ -71,7 +71,7 @@ func (d *ContainerdSampler) Enabled() bool {
7171

7272
d.containerdClient, err = initializeContainerdClient()
7373
if err != nil {
74-
cslog.WithError(err).Warn(errInitializeContainerd.Error())
74+
cslog.WithError(err).Info(errInitializeContainerd.Error())
7575

7676
return false
7777
}

pkg/metrics/docker_sampler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func (d *DockerSampler) Enabled() bool {
6969

7070
d.dockerClient, err = initializeDockerClient(d.apiVersion)
7171
if err != nil {
72-
dslog.WithError(err).Warn("unable to initialize docker client, could be not installed on the host")
72+
dslog.WithError(err).Info("unable to initialize docker client, maybe it is not installed on the host")
7373

7474
return false
7575
}

0 commit comments

Comments
 (0)