Skip to content

[CONFIGURATION] Add a builder for the host resource detector - #4455

Merged
dbarker merged 1 commit into
open-telemetry:mainfrom
Shaurya2k06:feat/host-detector-builder-4451
Aug 19, 2026
Merged

dbarker merged 1 commit into
open-telemetry:mainfrom
Shaurya2k06:feat/host-detector-builder-4451

Conversation

@Shaurya2k06

Copy link
Copy Markdown
Contributor

Fixes #4451

Changes

Adds a configuration builder for the host resource detector, HostDetectorBuilder, in resource_detectors/, following the ContainerDetectorBuilder / ProcessDetectorBuilder pattern. Build returns a HostResourceDetector. The builder is registered in examples/configuration/main.cc behind OTEL_HAVE_RESOURCE_DETECTORS.

The builder is exported as opentelemetry_host_resource_detector_builder / //resource_detectors:host_resource_detector_builder and is included in resource_detectors_builders. Unit tests, install tests, README, CHANGELOG, and the kitchen-sink example YAML are updated so - host: can be configured via declarative configuration.

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

Fixes open-telemetry#4451

Signed-off-by: shaurya2k06 <shaurya2k06@gmail.com>
@Shaurya2k06
Shaurya2k06 requested a review from a team as a code owner August 19, 2026 17:13
@codecov

codecov Bot commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.63%. Comparing base (57253cd) to head (95f868c).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4455      +/-   ##
==========================================
+ Coverage   82.61%   82.63%   +0.02%     
==========================================
  Files         511      512       +1     
  Lines       20132    20138       +6     
==========================================
+ Hits        16631    16639       +8     
+ Misses       3501     3499       -2     
Files with missing lines Coverage Δ
resource_detectors/src/host_detector_builder.cc 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dbarker dbarker left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good. Thanks!

@dbarker
dbarker merged commit 3603e13 into open-telemetry:main Aug 19, 2026
73 checks passed
@Shaurya2k06

Copy link
Copy Markdown
Contributor Author

Thanks for the quick review! I'm open to trying out more medium difficulty issues in the future and get myself more familiar with the ecosystem.

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.

[CONFIGURATION] Host Resource Detector Builder

2 participants