Skip to content

[receiver/hostmetrics] No viable perflib package #38858

Closed
@braydonk

Description

@braydonk

Component(s)

receiver/hostmetrics

What happened?

Description

The perflib package that was used to create the perfcounter scraper went unmaintained some time ago.
In #33653 we updated to use a copy of the library in windows_exporter. However, in v0.30.0 this package was removed (moved to internal).

As such, we no longer have a viable maintained upstream package that provides perflib_exporter's original functionality for raw-querying Windows performance counters.

The way I see it, there are two options:

  1. Vendor perflib ourselves, since we rely on it and there is no longer a maintained upstream alternative
  2. Reimplement what perflib does with our own code
  3. Request that the windows_exporter maintainers make the perflib package non-internal so we can import it. This is in essence asking them to provide a level of maintenance they may not be interested in, given the effort to remove/internalize the package in the new windows_exporter version

It is possible that what the perfcounters package does can be done in a different way than what perflib does, but I simply don't have the Windows expertise to make that judgement. In the short term, I am inclined toward Option 1.

Collector version

v0.122.0

Environment information

N/A

OpenTelemetry Collector configuration

N/A

Log output

N/A

Additional context

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions