Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
9 changes: 3 additions & 6 deletions internal/collector/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ func (c *Collector) Describe(ch chan<- *prometheus.Desc) {
metricConfig.Labels)

ch <- desc
c.logger.Debug("simple metric description added", "metric", metricConfig.Name)
continue
}
for _, subMetric := range metricConfig.SubMetrics {
Expand All @@ -66,17 +65,15 @@ func (c *Collector) Describe(ch chan<- *prometheus.Desc) {
labels,
)
ch <- desc
c.logger.Debug("sub-metric description added", "sub-metric", subMetric.Name)
}
}

c.logger.Debug("metric description reading ended")
}

func (c *Collector) ReloadConfig() error {
var newCfg config.Config

if err := config.Load(c.configPath, &newCfg); err != nil {
c.logger.Error("failed to reload config", "error", err)
return err
}

Expand All @@ -101,7 +98,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) {

Checks.Inc()

c.logger.Info("Metrics collection started")
c.logger.Debug("Metrics collection started")

wg := sync.WaitGroup{}

Expand Down Expand Up @@ -132,5 +129,5 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) {

wg.Wait()

c.logger.Info("Metrics collection finished")
c.logger.Debug("Metrics collection finished")
}
2 changes: 0 additions & 2 deletions internal/collector/processing.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ func (c *Collector) collectSimpleMetric(ch chan<- prometheus.Metric, metricConfi
}
ch <- metric
}
c.logger.Debug("metric collected successfully", "metric", metricConfig.Name)
}

// collectComplicatedMetric handles metric group defined with sub-metrics section.
Expand Down Expand Up @@ -153,7 +152,6 @@ func (c *Collector) collectComplicatedMetric(ch chan<- prometheus.Metric, metric
continue
}
ch <- metric
c.logger.Debug("sub-metric collected successfully", "sub-metric", subMetric.Name)
}
}
}