From 38b7463368b28cc316e0015907d917526f6f8f75 Mon Sep 17 00:00:00 2001 From: Keval Bhogayata <90185475+bhogayatakb@users.noreply.github.com> Date: Fri, 20 Dec 2024 12:12:55 +0530 Subject: [PATCH] Windows build fix - New scrapers applied (#101) --- .../internal/scraper/networkscraper/network_others.go | 2 +- .../scraper/processscraper/process_scraper_windows.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/receiver/hostmetricsreceiver/internal/scraper/networkscraper/network_others.go b/receiver/hostmetricsreceiver/internal/scraper/networkscraper/network_others.go index 264526d6ed92..a2a31be023a5 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/networkscraper/network_others.go +++ b/receiver/hostmetricsreceiver/internal/scraper/networkscraper/network_others.go @@ -31,7 +31,7 @@ func (s *networkScraper) recordNetworkConntrackMetrics() error { return nil } -func (s *scraper) recordSystemNetworkIoBandwidth(now pcommon.Timestamp, networkBandwidthMap map[string]bcal.NetworkBandwidth) { +func (s *networkScraper) recordSystemNetworkIoBandwidth(now pcommon.Timestamp, networkBandwidthMap map[string]bcal.NetworkBandwidth) { if s.config.Metrics.SystemNetworkIoBandwidth.Enabled { for device, networkBandwidth := range networkBandwidthMap { s.mb.RecordSystemNetworkIoBandwidthDataPoint(now, networkBandwidth.InboundRate, device, metadata.AttributeDirectionReceive) diff --git a/receiver/hostmetricsreceiver/internal/scraper/processscraper/process_scraper_windows.go b/receiver/hostmetricsreceiver/internal/scraper/processscraper/process_scraper_windows.go index e9056d1d5e90..62119f7f3de5 100644 --- a/receiver/hostmetricsreceiver/internal/scraper/processscraper/process_scraper_windows.go +++ b/receiver/hostmetricsreceiver/internal/scraper/processscraper/process_scraper_windows.go @@ -18,7 +18,7 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/hostmetricsreceiver/internal/scraper/processscraper/ucal" ) -func (s *scraper) recordCPUPercentMetric(now pcommon.Timestamp, cpuPercent float64) { +func (s *processScraper) recordCPUPercentMetric(now pcommon.Timestamp, cpuPercent float64) { s.mb.RecordProcessCPUPercentDataPoint(now, cpuPercent) } @@ -27,7 +27,7 @@ func (s *processScraper) recordCPUTimeMetric(now pcommon.Timestamp, cpuTime *cpu s.mb.RecordProcessCPUTimeDataPoint(now, cpuTime.System, metadata.AttributeStateSystem) } -func (s *scraper) recordMemoryPercentMetric(now pcommon.Timestamp, memoryPercent float32) { +func (s *processScraper) recordMemoryPercentMetric(now pcommon.Timestamp, memoryPercent float32) { s.mb.RecordProcessMemoryPercentDataPoint(now, float64(memoryPercent)) }