Skip to content

Commit

Permalink
add call to set perf query (#6065)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattdurham authored and marctc committed Jan 9, 2024
1 parent b4d2228 commit 9ba2cef
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ v0.39.0-rc.0 (2024-01-05)

- Fix issue where `prometheus.exporter.kafka` would crash when configuring `sasl_password`. (@rfratto)

- Fix performance issue where perf lib where clause was not being set, leading to timeouts in collecting metrics for windows_exporter. (@mattdurham)


### Other changes

- Bump github.com/IBM/sarama from v1.41.2 to v1.42.1
Expand Down
5 changes: 5 additions & 0 deletions pkg/integrations/windows_exporter/windows_exporter_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ func New(logger log.Logger, c *Config) (integrations.Integration, error) {
if err != nil {
return nil, err
}
err = winCol.SetPerfCounterQuery()
if err != nil {
return nil, err
}

return integrations.NewCollectorIntegration(c.Name(), integrations.WithCollectors(
// Hard-coded 4m timeout to represent the time a series goes stale.
// TODO: Make configurable if useful.
Expand Down

0 comments on commit 9ba2cef

Please sign in to comment.