@@ -60,7 +60,7 @@ func (c *Controller) processBlockDeviceMetrics(timestamp time.Time) error {
6060 return fmt .Errorf ("failed to collect block device metrics: %w" , err )
6161 }
6262
63- c .log .Infof ("collected %d block device metrics" , len (blockMetrics ))
63+ c .log .Debugf ("collected %d block device metrics" , len (blockMetrics ))
6464
6565 if err := c .blockDeviceMetricsWriter .Write (blockMetrics ... ); err != nil {
6666 return fmt .Errorf ("failed to write block device metrics: %w" , err )
@@ -79,7 +79,7 @@ func (c *Controller) processFilesystemMetrics(ctx context.Context, timestamp tim
7979 return fmt .Errorf ("failed to collect filesystem metrics: %w" , err )
8080 }
8181
82- c .log .Infof ("collected %d filesystem metrics" , len (fsMetrics ))
82+ c .log .Debugf ("collected %d filesystem metrics" , len (fsMetrics ))
8383
8484 if err := c .filesystemMetricsWriter .Write (fsMetrics ... ); err != nil {
8585 return fmt .Errorf ("failed to write filesystem metric: %w" , err )
@@ -102,11 +102,11 @@ func (c *Controller) processPodVolumeMetrics(ctx context.Context) error {
102102 }
103103
104104 if len (metrics ) == 0 {
105- c .log .Info ("no pod volume metrics collected from controller (empty response)" )
105+ c .log .Debug ("no pod volume metrics collected from controller (empty response)" )
106106 return nil
107107 }
108108
109- c .log .Infof ("collected %d pod volume metrics" , len (metrics ))
109+ c .log .Debugf ("collected %d pod volume metrics" , len (metrics ))
110110
111111 if err := c .podVolumeMetricsWriter .Write (metrics ... ); err != nil {
112112 return fmt .Errorf ("failed to write pod volume metrics: %w" , err )
@@ -130,11 +130,11 @@ func (c *Controller) processCloudVolumeMetrics(ctx context.Context) error {
130130 }
131131
132132 if len (metrics ) == 0 {
133- c .log .Info ("no cloud volume metrics collected from controller (empty response)" )
133+ c .log .Debug ("no cloud volume metrics collected from controller (empty response)" )
134134 return nil
135135 }
136136
137- c .log .Infof ("collected %d cloud volume metrics" , len (metrics ))
137+ c .log .Debugf ("collected %d cloud volume metrics" , len (metrics ))
138138
139139 if err := c .cloudVolumeMetricsWriter .Write (metrics ... ); err != nil {
140140 c .log .Errorf ("failed to write cloud volumes metrics: %v" , err )
@@ -151,13 +151,14 @@ func (c *Controller) collectNodeStatsSummary(ctx context.Context) {
151151 ctx , cancel := context .WithTimeout (ctx , 30 * time .Second )
152152 defer cancel ()
153153
154+ start := time .Now ().UTC ()
154155 metric , err := c .storageInfoProvider .CollectNodeStatsSummary (ctx )
155156 if err != nil {
156157 c .log .Errorf ("failed to collect node stats summary: %v" , err )
157158 return
158159 }
159160
160- c .log .Info ("collected node stats summary" )
161+ c .log .With ( "duration" , time . Since ( start )). Info ("collected node stats summary" )
161162
162163 if err := c .nodeStatsSummaryWriter .Write (* metric ); err != nil {
163164 c .log .Errorf ("failed to write node stats summary: %v" , err )
0 commit comments