Closed jenshnielsen closed 1 day ago
Thanks for reporting, that means that we are not running tests for this instrumentation on windows I guess :sweat:
Will a check of sys.platform be sufficient OR need to collect this metric on Windows?
As far as I am concerned skipping it is fine. I assumed but have not checked that psutil does not implement it on windows because there is no straightforward way to implement this.
I am working on it and will submit a PR soon
Describe your environment
OS: Windows 11 Python version: Any but specifically 3.11 Package version: (e.g., 0.48b0) of opentelemetry-instrumentation-system-metrics
What happened?
Enabling system metrics with the default configuration result in errors of the form
AttributeError: 'Process' object has no attribute 'num_fds'
during metrics collection on windowsThis metrics was implemented in #2652 which was first part of 0.480b of opentelemetry-instrumentation-system-metrics
Steps to Reproduce
And wait for metrics to be collected and you will see an error as below
Expected Result
No errors during metrics collection. Either metric is off by default or implemented differently on window
Actual Result
Error during metrics collection
Since psutils does not implement num_fds on windows
Additional context
No response
Would you like to implement a fix?
None