mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-03-08 03:26:35 +00:00
Refactor cpu collector to use perflib instead of WMI.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
// +build windows
|
||||
// +build windows,cgo
|
||||
|
||||
package collector
|
||||
|
||||
@@ -131,7 +131,7 @@ func NewContainerMetricsCollector() (Collector, error) {
|
||||
|
||||
// Collect sends the metric values for each metric
|
||||
// to the provided prometheus Metric channel.
|
||||
func (c *ContainerMetricsCollector) Collect(ch chan<- prometheus.Metric) error {
|
||||
func (c *ContainerMetricsCollector) Collect(ctx *ScrapeContext, ch chan<- prometheus.Metric) error {
|
||||
if desc, err := c.collect(ch); err != nil {
|
||||
log.Error("failed collecting ContainerMetricsCollector metrics:", desc, err)
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user