Refactor propagator schema #187
Merged
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.
See comment.
Supersedes #173.
This refactors
.propagator.compositefrom being an array of string entries to an array of objects. Each object has a single key identifying the name of the propagator.This aligns propagator with the data modeling of other SDK extension points (processors, exporters, readers, sampler) where the extension point identifier is a key, and the object's value is passed as a node to configure that extension point. In the case of propagators, none of the built-in propagators currently accept configuration, but its conceivable that they may in the future.
The propagator comments have also been changed to indicate that omitting
.propagatoror having an empty.propagator.compositelist results in a noop propgator. This aligns propagator config with the "what you see is what you get" philosophy used elsewhere in declarative config data modeling.Finally, a new
.propagator.composite_listproperty has been added with the same semantics asOTEL_PROPAGATORSenv var. The comments indicate a merge semantic where entries from.propagator.composite_listare appended to.propagator.composite(with duplicates removed) when both are present. The ordering here is important because order that propagators are registered is signficiant, particularly when extracting context.