Repository navigation
[CONFIGURATION] Set schema default values for all parameters (#4432) - #4440
Merged
marcalff merged 3 commits intoAug 17, 2026
Merged
Conversation
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4440 +/- ##
=======================================
Coverage 82.62% 82.62%
=======================================
Files 511 511
Lines 20132 20132
=======================================
Hits 16633 16633
Misses 3499 3499
🚀 New features to boost your workflow:
|
Avoid ODR-use of static constexpr configuration defaults in C++14 YAML tests by comparing parsed values against default-constructed configuration models.
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4432
Changes
Align declarative configuration
kDefault*constants with OpenTelemetry Configuration Schema v1.1.0 when the corresponding configuration fields are omitted.Default updates
attribute_limits.attribute_value_length_limitlogger_provider.limits.attribute_value_length_limittracer_provider.limits.attribute_value_length_limitbatchlog processorschedule_delayperiodicmetric readerintervaltrace_id_ratio_basedsamplerratioThe three attribute value length limits use
(std::numeric_limits<std::size_t>::max)(), matching the existing SDK "no limit" representation inspan_limits.handlog_record_limits.h.Breaking behavior
When the corresponding configuration field is omitted, parsed configuration now reflects the schema defaults above instead of the previous legacy values. This affects attribute truncation, batch log export timing, metric export interval, and trace sampling ratio.
Explicit configuration values are unchanged.
The breaking changes are documented under
[Unreleased]inCHANGELOG.md.Why no parser/builder changes
configuration_parser.ccalready assigns omitted fields from the correspondingConfig::kDefault*constants. Updating these constants is therefore sufficient for the parsed configuration model to use the new defaults.Tests
Local build with
-DWITH_CONFIGURATION=ONand-DOTELCPP_MAINTAINER_MODE=ON:yaml_testyaml_trace_testyaml_logs_testyaml_metrics_testsdk_builder_testDefault-expectation assertions in the YAML configuration tests were updated to reference the
kDefault*constants. Explicit-value tests (e.g.1111,5555,3.14) were not changed.Formatting / lint
--Werror -npassed on all 10 modified C++ files.CHANGELOG.mdpassed.The full Docker
do_ci.sh formatworkflow was not run locally because the Docker environment ran out of memory during third-party dependency builds. Targeted formatting validation with clang-format 18 completed successfully on all changed C++ files.Out of scope / follow-ups
null: The parser does not currently treat explicit YAMLnullthe same as an omitted field. This is not addressed by [CONFIGURATION] Set schema default values for all parameters #4432 and may be handled separately.attribute_limits: The configuration is parsed but not applied bySdkBuilder; this is tracked separately in SDK Implement collection limits #3303.kitchen-sink.yaml: Retains explicit legacy values such as 4096 and 5000 and is intentionally unchanged because those are explicit example configuration values.For significant contributions please make sure you have completed the following items:
CHANGELOG.mdupdated for non-trivial changes