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

Add host.id for non-containerized systems #1266

Merged

Conversation

matt-hensley
Copy link
Contributor

Fixes #1263

Only mocked the file system for Linux.

BSD, MacOS, and Windows all shell out to get the ID. I've added tests covering parsing the output on MacOS and Windows.

Any and all feedback is welcome, I haven't written PHP in a long time.

@matt-hensley matt-hensley requested a review from a team March 26, 2024 19:46
Copy link

welcome bot commented Mar 26, 2024

Thanks for opening your first pull request! If you haven't yet signed our Contributor License Agreement (CLA), then please do so that we can accept your contribution. A link should appear shortly in this PR if you have not already signed one.

Copy link

codecov bot commented Mar 26, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 11 lines in your changes are missing coverage. Please review.

Project coverage is 83.78%. Comparing base (a1489d3) to head (13b1e59).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1266      +/-   ##
============================================
- Coverage     83.87%   83.78%   -0.10%     
- Complexity     2136     2148      +12     
============================================
  Files           296      296              
  Lines          6104     6137      +33     
============================================
+ Hits           5120     5142      +22     
- Misses          984      995      +11     
Flag Coverage Δ
8.1 83.78% <66.66%> (-0.10%) ⬇️
8.2 83.78% <66.66%> (-0.10%) ⬇️
8.3 83.78% <66.66%> (-0.10%) ⬇️
8.4 83.78% <66.66%> (-0.10%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
src/SDK/Resource/Detectors/Host.php 71.79% <66.66%> (-28.21%) ⬇️

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a1489d3...13b1e59. Read the comment docs.

src/SDK/Resource/Detectors/Host.php Outdated Show resolved Hide resolved
src/SDK/Resource/Detectors/Host.php Outdated Show resolved Hide resolved
src/SDK/Resource/Detectors/Host.php Outdated Show resolved Hide resolved
src/SDK/Resource/Detectors/Host.php Outdated Show resolved Hide resolved
src/SDK/Resource/Detectors/Host.php Outdated Show resolved Hide resolved
src/SDK/Resource/Detectors/Host.php Show resolved Hide resolved
src/SDK/Resource/Detectors/Host.php Outdated Show resolved Hide resolved
tests/Unit/SDK/Resource/Detectors/HostTest.php Outdated Show resolved Hide resolved
src/SDK/Resource/Detectors/Host.php Outdated Show resolved Hide resolved
src/SDK/Resource/Detectors/Host.php Outdated Show resolved Hide resolved
src/SDK/Resource/Detectors/Host.php Outdated Show resolved Hide resolved
src/SDK/Resource/Detectors/Host.php Outdated Show resolved Hide resolved
Copy link
Contributor

@ChrisLightfootWild ChrisLightfootWild left a comment

Choose a reason for hiding this comment

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

I have added a couple of untested suggestions for discussion/consideration!

src/SDK/Resource/Detectors/Host.php Outdated Show resolved Hide resolved
matt-hensley and others added 2 commits March 28, 2024 08:21
@brettmc brettmc merged commit bb9eb40 into open-telemetry:main Apr 1, 2024
8 of 9 checks passed
@brettmc
Copy link
Collaborator

brettmc commented Apr 1, 2024

Done! Thanks, @matt-hensley
This might take a couple of weeks to be tagged, as we're in the middle of preparing a mid-sized release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add host.id for non-containerized systems
5 participants