[dynamic control] Add pipeline config initialization from file#2753
Open
jackshirazi wants to merge 2 commits intoopen-telemetry:mainfrom
Open
[dynamic control] Add pipeline config initialization from file#2753jackshirazi wants to merge 2 commits intoopen-telemetry:mainfrom
jackshirazi wants to merge 2 commits intoopen-telemetry:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support in the dynamic-control module to initialize the policy pipeline configuration from an external YAML (preferred) or JSON file, selected via OpenTelemetry ConfigProperties.
Changes:
- Added
PolicyInitConfig.readFromConfigProperties(ConfigProperties)to load init configuration from a YAML/JSON file path configured via properties. - Added unit tests covering YAML-vs-JSON precedence, fallback when YAML property is blank, and failure scenarios (missing/unparseable files).
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| dynamic-control/src/main/java/io/opentelemetry/contrib/dynamic/policy/registry/PolicyInitConfig.java | Adds config-property driven file loading (YAML preferred, JSON supported) with logging on failure. |
| dynamic-control/src/test/java/io/opentelemetry/contrib/dynamic/policy/registry/PolicyInitConfigTest.java | Adds coverage for selection logic and error handling behavior. |
...control/src/main/java/io/opentelemetry/contrib/dynamic/policy/registry/PolicyInitConfig.java
Outdated
Show resolved
Hide resolved
...control/src/main/java/io/opentelemetry/contrib/dynamic/policy/registry/PolicyInitConfig.java
Show resolved
Hide resolved
LikeTheSalad
approved these changes
Apr 9, 2026
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.
Description:
Adding a method to read a pipeline initialization file in yaml (preferred) or json format.
Existing Issue(s):
#2546
Testing:
Added
Documentation:
Added
Outstanding items:
Wiring up the policy pipeline:
Steps needed for the wiring: