[SDK] Support independent programmatic configuration#4240
Conversation
…on test, and fixes
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4240 +/- ##
==========================================
+ Coverage 77.91% 81.22% +3.31%
==========================================
Files 439 443 +4
Lines 18592 18670 +78
==========================================
+ Hits 14485 15163 +678
+ Misses 4107 3507 -600
🚀 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.
Changes
configuration_core)cppcoreguidelines-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