open-telemetry / opentelemetry-collector

OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
4.36k stars 1.44k forks source link

Deprecate third party code from host metrics receiver #973

Closed james-bebbington closed 4 years ago

james-bebbington commented 4 years ago

The Host Metrics receiver currently includes third party code for retrieving windows performance counter info, which is used to calculate load and paging metrics. We also calculate page file usage from a direct syscall into psapi.dll.

Ideally, we would like to upstream code to gopsutil to calculate these values directly so we can remove this code from the Collector repo.

james-bebbington commented 4 years ago

Updated plans for this:

  1. The Host Metrics receiver currently uses third party code that accesses pdh.dll to extract perf counter data. This is useful for getting generic performance counter data, so will move this code to Contrib and create a perf counter receiver that targets Windows only. That receiver will be useful for generating stats on IIS, SQL Server, etc. Tracked in https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/1088.
  2. Update core to use https://github.com/leoluk/perflib_exporter (note this is also used by https://github.com/prometheus-community/windows_exporter). This package reads from the Windows registry directly so
  3. Upstream page file usage calls to gopsutil (this is still the long term plan)

Benefits of (2):

tigrannajaryan commented 4 years ago

@james-bebbington are we done with this issue?

james-bebbington commented 4 years ago

There is one comment above about moving the pagefile syscalls to gopsutil which is not done but that is not third party code and not very high priority so yes I think it makes sense to close this issue: all third party code is gone 👍