Skip to content

[SDK] Support independent programmatic configuration - #4240

Closed
dbarker wants to merge 18 commits into
open-telemetry:mainfrom
dbarker:sdk_configuration_core_and_tests
Closed

dbarker wants to merge 18 commits into
open-telemetry:mainfrom
dbarker:sdk_configuration_core_and_tests

Conversation

@dbarker

@dbarker dbarker commented Jul 11, 2026

Copy link
Copy Markdown
Member

Fixes #4134 and follow up from ##3655 (review)

Break out the programmatic configuration to its own library so it can be used without the ryml dependency.

[edit - crossed out items that were broken out to separate PRs]

Changes

  • Creates the programmatic configuration target (configuration_core)
  • Adds configuration_core to the CMake install tests
  • Adds deprecated names to components and deprecates the *builder components since they only depend on the SDK now and do not bring in dependencies.
  • Adds programmatic_configuration_test.cc
  • Fix issues found with the new test
    • LoggerConfigurator supporting min severity and trace based fields
    • Initialize members of config classes to the spec default constants.
    • Set the default parent based root sampler to always_on
    • Set the default sampler to parent based always on
    • Set all batch processor options that the user configured
    • Handle default metric stream aggregation
  • Fix the cppcoreguidelines-pro-type-member-init warnings in configuration and sdk files used by the tests.
  • Update INSTALL doc for the configuration targets

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 Jul 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.58%. Comparing base (5af96de) to head (10d6b5a).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #4240   +/-   ##
=======================================
  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.

…scale, test crash due to setting global providers to null, missing targets and files in the fetch content test
@dbarker dbarker added the pr:do-not-merge This PR is not ready to be merged. label Jul 12, 2026
@dbarker

dbarker commented Jul 13, 2026

Copy link
Copy Markdown
Member Author

This PR will be broken up into multiple PRs (will edit with PR links).

  1. Tests for SdkBuilder, ConfiguredSdk, and integration tests for programmatic configuration along with fixes to the SdkBuilder they exposed.
  2. Move spec defaults from the configuration_parser.cc to each configuration struct.
  3. Add CMake support for deprecating components and update the policy
  4. CMake separation of configuration_core and configuration
  5. Clean up transitive includes and linking for configuration_core
  6. CMake component cleanup and deprecation of the "builder" components since the sdk will now include the builder interfaces.

@dbarker

dbarker commented Aug 14, 2026

Copy link
Copy Markdown
Member Author

The last PR associated with this draft has been created. Closing this.

@dbarker dbarker closed this Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr:do-not-merge This PR is not ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Programmatic Configuration without YAML dependencies

1 participant