Closed
Description
Component(s)
processor/resourcedetection
What happened?
Description
system resource detection fails with:
{"level":"warn","ts":1699364976.361069,"caller":"system/system.go:102","msg":"failed to get host cpuinfo","kind":"processor","name":"resourcedetection/env","pipeline":"metrics","error":"failed to convert cpuinfo family to integer: strconv.ParseInt: parsing \"POWER\": invalid syntax"}
The issue is that system detector expects the family to be int in:
But the actual library returns POWER
string in certain cases:
Also looking at this repo which has a lot of example of cpuinfo, there seems to be a lot of families that are not numbers:
https://github.com/search?q=repo%3Arandombit%2Fcpuinfo%20Family&type=code
Steps to Reproduce
Expected Result
No error
Actual Result
Collector version
v0.88.0
Environment information
No response
OpenTelemetry Collector configuration
No response
Log output
No response
Additional context
I believe we need to change host.cpu.family
to be a string resource attribute instead of int and get rid of parsing.