Skip to content

[CONFIGURATION/TEST] SdkBuilder test separation and expansion by provider type - #4441

Open
dbarker wants to merge 10 commits into
open-telemetry:mainfrom
dbarker:config_test_separation_by_signal
Open

[CONFIGURATION/TEST] SdkBuilder test separation and expansion by provider type#4441
dbarker wants to merge 10 commits into
open-telemetry:mainfrom
dbarker:config_test_separation_by_signal

Conversation

@dbarker

@dbarker dbarker commented Aug 16, 2026

Copy link
Copy Markdown
Member

Contributes to #4352 (Step three from #4352 (comment))

In order to verify configuration_core is independent of SDK signal libraries and to validate the SdkBuilder breakup into signal specific builders/utils, this PR focuses on separating tests in the sdk/test/configuration by provider type (trace, metrics, logs, propagation).

Only sdk/test/configuration test files are changed in this PR.

Additionally the tests are expanded to verify each signal provider and its SDK components can be built using all registry builders for the signal through the SdkBuilder's methods. This is important to support the next step to split out the SDK component creation functions from the SdkBuilder into signal specific files and break its dependency on signal libraries.

Changes

  • Break up the config_test_common.h test file into separate files per signal (3dedf6a) and remove it.
  • Update the programmatic config test to include the separate signal test files (ae63f35)
  • Update the ConfiguredSdk test to include the separate signal test files (3a13755)
  • Move, clean up and expand SdkBuilder tests into signal builder test files (3a13755)
    • Tests follow a common pattern in logs_builders_test.cc, metrics_builders_test.cc, trace_builders_test.cc:
      1. A {Metrics,Logs,Trace}BuildersTest fixture registers all signal specific builders on SetUp and provides functions to use SdkBuilder (to be replaced with signal specific utility functions in the next PR).
      2. Test cases that exercise the public functions from SdkBuilder::{Create,Add,Set}* to create SDK objects from config models and verify them
      3. Test cases to verify the use case of unregistering builders (SdkBuilder must throw exceptions)
      4. Test cases to verify creation of working {Meter,Logger,Tracer}Providers with models that cover the available exporters and processors.
  • Remove the SdkBuilder use from the yaml metrics test (8b95057)
    • This test case was covering invalid yaml that can be caught by schema validation. The case is valid for programmatic config and was added to the metrics_builder_test.cc CreateAttributesProcess case.
  • Create the propagators test file (23e08d4)
  • CMake and Bazel build file updates (3e4197c)

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 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.59%. Comparing base (60c3d11) to head (5fcef5a).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4441      +/-   ##
==========================================
+ Coverage   82.61%   85.59%   +2.98%     
==========================================
  Files         511      511              
  Lines       20132    20132              
==========================================
+ Hits        16631    17229     +598     
+ Misses       3501     2903     -598     

see 44 files 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 marked this pull request as ready for review August 17, 2026 03:22
@dbarker
dbarker requested a review from a team as a code owner August 17, 2026 03:22
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.

1 participant