Skip to content

[CONFIGURATION/BUILD] Resource detector targets and README - #4430

Merged
marcalff merged 7 commits into
open-telemetry:mainfrom
dbarker:cmake_separate_resource_detector_targets
Aug 14, 2026
Merged

marcalff merged 7 commits into
open-telemetry:mainfrom
dbarker:cmake_separate_resource_detector_targets

Conversation

@dbarker

@dbarker dbarker commented Aug 14, 2026

Copy link
Copy Markdown
Member

Contributes to: #3548
Follow up to #4417 (comment)

The spec defines built-in resource detectors as host, service, process, and container along with an experimental EnvEntity detector.

The detectors should follow the Entity semantic conventions for attributes:

The implemented resource detectors support a small subset of these attributes and are currently built into a single target (and single test executable).

This PR sets up the documentation and creates individual targets for each detector that will make it easier for contributors to add support for attributes. Individual detector targets will allow users to link only what they use.

Changes

  • Create individual targets (CMake and Bazel) for each detector and builder
  • Create two interface targets to group all detector and builders respectively
  • Update builders to link detector targets privately
  • Break up the one unit test exe into per detector/builder tests
  • Update install tests to use the new targets
  • Add README for the detectors directory

Please provide a brief description of the changes here.

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

@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.58%. Comparing base (3fb1d31) to head (0836842).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #4430   +/-   ##
=======================================
  Coverage   82.58%   82.58%           
=======================================
  Files         511      511           
  Lines       20039    20039           
=======================================
  Hits        16548    16548           
  Misses       3491     3491           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dbarker
dbarker marked this pull request as ready for review August 14, 2026 17:08
@dbarker
dbarker requested a review from a team as a code owner August 14, 2026 17:08

@marcalff marcalff 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.

LGTM

@marcalff
marcalff merged commit 85308a2 into open-telemetry:main Aug 14, 2026
73 checks passed
@dbarker
dbarker deleted the cmake_separate_resource_detector_targets branch August 14, 2026 23:00
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.

2 participants