[SDK] Support independent programmatic configuration#4240
Conversation
…on test, and fixes
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4240 +/- ##
=======================================
Coverage 81.19% 81.19%
=======================================
Files 444 444
Lines 18880 18880
=======================================
Hits 15328 15328
Misses 3552 3552
🚀 New features to boost your workflow:
|
…scale, test crash due to setting global providers to null, missing targets and files in the fetch content test
| } | ||
|
|
||
| // Zero values indicate the field is not set. | ||
| std::size_t max_scale{0}; |
There was a problem hiding this comment.
This is a case where zero is a valid value for the option so it is not a great way to indicate "not set". Instead of using zero in all these config structs to indicate not set, we may consider either setting the spec defaults (which the SDK/exporter options structs also do) or bring in an std::optional/nostd::optional type.
There was a problem hiding this comment.
The spec seems clear on the in memory configuration model.
https://opentelemetry.io/docs/specs/otel/configuration/sdk/#in-memory-configuration-model
If a property is present and the value is null, Create MUST use the nullBehavior, or defaultBehavior if nullBehavior is not set.
Changes:
- Updated the config files to define and initialize to the default values provided by the configuration schema as
defaultBehavior. - Updated the parser to use the config class defaults.
- Added
TODOswhere the current implementation defaults differed from the schema.
…sdk structs from config structs in the builder
…ndpoint. revert change to aggregation_config.h
…ffered data. update install.md to note configuration targets are experimental
…e their targets into the respective component
|
This PR will be broken up into multiple PRs (will edit with PR links).
|
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
configuration_core)Adds programmatic_configuration_test.ccFix issues found with the new testLoggerConfigurator supporting min severity and trace based fieldsInitialize members of config classes to the spec default constants.Set the default parent based root sampler to always_onSet the default sampler to parent based always onSet all batch processor options that the user configuredHandle default metric stream aggregationcppcoreguidelines-pro-type-member-initwarnings in configuration and sdk files used by the tests.For significant contributions please make sure you have completed the following items:
CHANGELOG.mdupdated for non-trivial changes