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

[processor/resourcedetection] fix parsing error for windows #27678

Merged
merged 3 commits into from
Oct 16, 2023

Conversation

VihasMakwana
Copy link
Contributor

Description:
The system detector extracts all the cpu info from the system even if you disable the configs and I believe this is where the bug kicks in. Disabling the settings will only stop it from setting the resource attributes.

The library that we rely on doesn't extract some attributes for Windows OS (in this case, the field cpu.Model) and it leaves this field empty. This results in a bug when we try to parse an empty string.

The long-term fix will be to extract cpu.Model in gopsutil upstream library.

Link to tracking Issue: #27675

@VihasMakwana VihasMakwana requested a review from a team October 15, 2023 19:50
@github-actions github-actions bot added the processor/resourcedetection Resource detection processor label Oct 15, 2023
@VihasMakwana VihasMakwana changed the title fix: fix parsing error for windows [processor/resourcedetection] fix parsing error for windows Oct 15, 2023
@mx-psi mx-psi merged commit ab79a8b into open-telemetry:main Oct 16, 2023
82 checks passed
@github-actions github-actions bot added this to the next release milestone Oct 16, 2023
JaredTan95 pushed a commit to openinsight-proj/opentelemetry-collector-contrib that referenced this pull request Oct 18, 2023
…emetry#27678)

**Description:** 
The `system` detector extracts all the `cpu` info from the system even
if you disable the configs and I believe this is where the bug kicks in.
Disabling the settings will only stop it from setting the resource
attributes.

The
[library](https://github.com/shirou/gopsutil/blob/v3.23.9/cpu/cpu_windows.go#L113)
that we rely on doesn't extract some attributes for Windows OS (in this
case, the field `cpu.Model`) and it leaves this field empty. This
results in a bug when we try to parse an empty string.

The long-term fix will be to extract `cpu.Model` in `gopsutil` upstream
library.

**Link to tracking Issue:**
open-telemetry#27675
jmsnll pushed a commit to jmsnll/opentelemetry-collector-contrib that referenced this pull request Nov 12, 2023
…emetry#27678)

**Description:** 
The `system` detector extracts all the `cpu` info from the system even
if you disable the configs and I believe this is where the bug kicks in.
Disabling the settings will only stop it from setting the resource
attributes.

The
[library](https://github.com/shirou/gopsutil/blob/v3.23.9/cpu/cpu_windows.go#L113)
that we rely on doesn't extract some attributes for Windows OS (in this
case, the field `cpu.Model`) and it leaves this field empty. This
results in a bug when we try to parse an empty string.

The long-term fix will be to extract `cpu.Model` in `gopsutil` upstream
library.

**Link to tracking Issue:**
open-telemetry#27675
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
processor/resourcedetection Resource detection processor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants