Skip to content

[signalfxexporter] Fix invalid and missing host metadata #40218

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

Merged
merged 1 commit into from
May 29, 2025

Conversation

dloucasfx
Copy link
Contributor

@dloucasfx dloucasfx commented May 22, 2025

Description

Fix invalid and missing host metadata when the collector is deployed in a containerized environment and the host root filesystem is mounted to non-standard location.
This PR introduces the root_path config option which is used to create gopsutil context using https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/internal/gopsutilenv

Ideally this should be merged after #40213
To make sure gopsutilenv detects inconsistency if the root_path value between the hostmetrics receiver and sfx exporter are different

Testing

Unit tests and manual deployment

Documentation

README updated

Copy link
Contributor

@atoulme atoulme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@crobert-1
Copy link
Member

From failing check:

Tidylist is out of date, please run "make tidylist" and commit the changes in this PR.

@dloucasfx
Copy link
Contributor Author

From failing check:

Tidylist is out of date, please run "make tidylist" and commit the changes in this PR.

@crobert-1
I think there is a false positive issue here.
I ran make tidylist before pushing the PR and the file was updated.
If I re-run it locally against my branch I don't get/detect a change, not sure if it's on my end or something is up with the action.

@dloucasfx dloucasfx force-pushed the sfxexporterhostmetadata branch from c703fb2 to 2121719 Compare May 22, 2025 17:51
@atoulme
Copy link
Contributor

atoulme commented May 27, 2025

Please rebase to fix conflicts.

@atoulme
Copy link
Contributor

atoulme commented May 27, 2025

Usually if make tidylist doesn't update on your branch, it might mean you need to update to latest main and try again.

…lector is deployed in a containerized environment and the host root filesystem is mounted to non-standard location.

Signed-off-by: Dani Louca <[email protected]>
@dloucasfx dloucasfx force-pushed the sfxexporterhostmetadata branch from 2121719 to ade3977 Compare May 27, 2025 20:04
@atoulme atoulme merged commit e9276a7 into open-telemetry:main May 29, 2025
177 checks passed
@github-actions github-actions bot added this to the next release milestone May 29, 2025
dd-jasminesun pushed a commit to DataDog/opentelemetry-collector-contrib that referenced this pull request Jun 23, 2025
…try#40218)

#### Description
Fix invalid and missing host metadata when the collector is deployed in
a containerized environment and the host root filesystem is mounted to
non-standard location.
This PR introduces the `root_path` config option which is used to create
gopsutil context using
https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/internal/gopsutilenv

Ideally this should be merged after
open-telemetry#40213
To make sure gopsutilenv detects inconsistency if the root_path value
between the hostmetrics receiver and sfx exporter are different
#### Testing
Unit tests and manual deployment

#### Documentation
README updated

Signed-off-by: Dani Louca <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants