Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate third party code from host metrics receiver #973

Closed
james-bebbington opened this issue May 15, 2020 · 3 comments
Closed

Deprecate third party code from host metrics receiver #973

james-bebbington opened this issue May 15, 2020 · 3 comments
Labels
help wanted Good issue for contributors to OpenTelemetry Service to pick up

Comments

@james-bebbington
Copy link
Member

james-bebbington commented May 15, 2020

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
Copy link
Member Author

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 Add Windows Performance Counters Receiver opentelemetry-collector-contrib#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):

  • Slightly faster since reading from the registry directly
  • Can remove third_party code from Core 🎉
  • Don't need to refactor the current third_party code to be accessible from Contrib. Just move it to Contrib instead as part of (1).
  • Don't need to reverse engineer Sums from rates, and can report the Sums since boot time instead of since process start.

@tigrannajaryan
Copy link
Member

@james-bebbington are we done with this issue?

@james-bebbington
Copy link
Member Author

james-bebbington commented Oct 2, 2020

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 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Good issue for contributors to OpenTelemetry Service to pick up
Projects
None yet
Development

No branches or pull requests

3 participants