Skip to content

Commit

Permalink
fix: log instance name in skip warnings (#10995)
Browse files Browse the repository at this point in the history
  • Loading branch information
reimda authored and MyaLongmire committed Jul 6, 2022
1 parent c4087e6 commit 41e16e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/inputs/win_perf_counters/win_perf_counters.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ func (m *Win_PerfCounters) Gather(acc telegraf.Accumulator) error {
if !isKnownCounterDataError(err) {
return fmt.Errorf("error while getting value for counter %s: %v", metric.counterPath, err)
}
m.Log.Warnf("error while getting value for counter %q, will skip metric: %v", metric.counterPath, err)
m.Log.Warnf("error while getting value for counter %q, instance: %s, will skip metric: %v", metric.counterPath, metric.instance, err)
continue
}
addCounterMeasurement(metric, metric.instance, value, collectFields)
Expand All @@ -367,7 +367,7 @@ func (m *Win_PerfCounters) Gather(acc telegraf.Accumulator) error {
if !isKnownCounterDataError(err) {
return fmt.Errorf("error while getting value for counter %s: %v", metric.counterPath, err)
}
m.Log.Warnf("error while getting value for counter %q, will skip metric: %v", metric.counterPath, err)
m.Log.Warnf("error while getting value for counter %q, instance: %s, will skip metric: %v", metric.counterPath, metric.instance, err)
continue
}
for _, cValue := range counterValues {
Expand Down

0 comments on commit 41e16e2

Please sign in to comment.