Skip to content

[CONFIGURATION] Decouple config registry and builder headers - #4335

Merged
dbarker merged 5 commits into
open-telemetry:mainfrom
dbarker:config_registry_cleanup
Aug 3, 2026
Merged

dbarker merged 5 commits into
open-telemetry:mainfrom
dbarker:config_registry_cleanup

Conversation

@dbarker

@dbarker dbarker commented Aug 2, 2026 •

Copy link
Copy Markdown
Member

Contributes to: #4134

The Registry class manages the builders used to create SDK components for each configuration struct. This class header currently includes all the builders (which include all the sdk components to be built).

The transitive includes from the Registry can be reduced by forward declaring the sdk builders in the registry and forward declaring the registry in each exporter builder.

This change helps move in the direction where the builders can link to just the SDK components they build and not require linking all SDK libraries.

Changes

  • Forward declare the builders in registry.h
  • Move the Set methods in Registry to the registry.cc file to enable forward declaring the registry.
  • Forward declare the registry and privately link configuration_core with builders outside the ./sdk/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

@codecov

codecov Bot commented Aug 2, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 9.30233% with 39 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.84%. Comparing base (43b656d) to head (37fe565).

Files with missing lines Patch % Lines
sdk/src/configuration/registry.cc 9.31% 39 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4335      +/-   ##
==========================================
- Coverage   81.00%   80.84%   -0.16%     
==========================================
  Files         448      448              
  Lines       19121    19161      +40     
==========================================
+ Hits        15488    15489       +1     
- Misses       3633     3672      +39     
Files with missing lines Coverage Δ
...include/opentelemetry/sdk/configuration/registry.h 7.15% <ø> (-8.98%) ⬇️
sdk/src/configuration/sdk_builder.cc 49.35% <ø> (ø)
sdk/src/configuration/registry.cc 46.16% <9.31%> (-14.02%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dbarker dbarker changed the title [CONFIGURATION] Clean up configuration_core transitive includes and linking [CONFIGURATION] Decouple config registry and builder headers Aug 2, 2026
@dbarker
dbarker marked this pull request as ready for review August 2, 2026 21:46
@dbarker
dbarker requested a review from a team as a code owner August 2, 2026 21:46
Comment thread exporters/otlp/CMakeLists.txt Resolved

@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, see minor comment in CMake.

@dbarker
dbarker merged commit 2beddad into open-telemetry:main Aug 3, 2026
72 checks passed
@dbarker
dbarker deleted the config_registry_cleanup branch August 3, 2026 03:40
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