mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-03-05 01:56:35 +00:00
collector: fix flapping metrics if process is enabled. (#1643)
This commit is contained in:
@@ -97,6 +97,7 @@ func (c *Collector) Build(logger *slog.Logger, _ *wmi.Client) error {
|
||||
// to the provided prometheus Metric channel.
|
||||
func (c *Collector) Collect(_ *types.ScrapeContext, logger *slog.Logger, ch chan<- prometheus.Metric) error {
|
||||
logger = logger.With(slog.String("collector", Name))
|
||||
|
||||
if err := c.collect(ch); err != nil {
|
||||
logger.Error("failed collecting cs metrics",
|
||||
slog.Any("err", err),
|
||||
|
||||
Reference in New Issue
Block a user