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

@@ -78,6 +78,7 @@ type Collector struct {
collectorWorkloadManagementWorkloads
config Config
logger *slog.Logger
collectorFns []func(ch chan<- prometheus.Metric) error
closeFns []func()
@@ -170,7 +171,9 @@ func (c *Collector) Close() error {
return nil
}
func (c *Collector) Build(_ *slog.Logger, _ *mi.Session) error {
func (c *Collector) Build(logger *slog.Logger, _ *mi.Session) error {
c.logger = logger.With(slog.String("collector", Name))
subCollectors := map[string]struct {
build func() error
collect func(ch chan<- prometheus.Metric) error