pdh: added logging, if PDH CStatus is not valid (#2203)

This commit is contained in:
Jan-Otto Kröpke
2025-09-07 13:31:29 +02:00
committed by GitHub
parent fcf21bb600
commit f1772a742f
76 changed files with 132 additions and 116 deletions

View File

@@ -215,7 +215,7 @@ func (c *Collector) Build(logger *slog.Logger, _ *mi.Session) error {
object.Type = pdh.CounterTypeRaw
}
collector, err := pdh.NewCollectorWithReflection(object.Type, object.Object, object.Instances, valueType)
collector, err := pdh.NewCollectorWithReflection(c.logger, object.Type, object.Object, object.Instances, valueType)
if err != nil {
errs = append(errs, fmt.Errorf("failed collector for %s: %w", object.Name, err))
}