opentelemetry-collector
opentelemetry-collector copied to clipboard
Error messages for hostmetrics from pseudo-processes or restricted processes should not give WARN errors
Describe the bug On Windows, some processes that are either pseudo-processes, like pid 0, the System Idle process, or restricted processes, like pid 4, the System process, should not give WARN messages when the hostmetrics are being scraped. Right now, when scraping hostmetrics, there is an error like this:
"[error reading process name for pid 0: The parameter is incorrect.; error reading process name for pid 4: A device attached to the system is not functioning.; error reading process name for pid 68: A device attached to the system is not functioning.]"
Steps to reproduce Can be reproduced using a GCP Windows instance of windows-server-2019-dc-v20210112 image. And installed using the GCP ops-agent instructions: http://cloud/stackdriver/docs/solutions/ops-agent/installation#agent-install-latest-windows
What did you expect to see? No error messages should be at the WARN level or higher for processes where the process name can't be determined due to them being restricted system processes.
What did you see instead? Expecting to see no errors when hostmetrics are turned on.
What version did you use? v0.15.0
What config did you use? Collected hostmetrics, including process metrics.
hostmetrics:
collection_interval: 60s
scrapers:
cpu:
load:
memory:
disk:
filesystem:
network:
swap:
process:
Environment OS: GCP Windows instance of windows-server-2019-dc-v20210112 image.
Additional context The code that generates the error message: link. It would need to have some processes skipped on Windows systems, and log an info message instead.
/cc @james-bebbington assigning to you since you are the expert
Hey @james-bebbington, is there any update on this?
@jsuereth
There is a similar report at https://github.com/open-telemetry/opentelemetry-collector/issues/3004.
There is a similar report at #3004.
Exactly. And these errors are non harmful, which can be discarded. open-telemetry/opentelemetry-collector-contrib#7176 did a workaround to mute these spam errors.
I think after that PR this issue is done. Feel free to reopen if not.