[dynamic control] Add policy pipeline initializing manager#2826
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new “policy pipeline initialization manager” for the dynamic-control module to coordinate policy-type resolution, initialization, and source activation when telemetry policy wiring is configured.
Changes:
- Added
PolicyInitregistry/bootstrap responsible for resolving configuredpolicyTypemappings, initializing policy types, and activating configured policy sources. - Extended
PolicyInitConfigwith an additional declarative-config parsing entrypoint for callers that already have thetelemetry_policysubtree. - Exposed
OpampPolicyProvider.resetForTest()publicly to support cross-package test reset usage.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| dynamic-control/src/main/java/io/opentelemetry/contrib/dynamic/policy/registry/PolicyInitConfig.java | Adds a helper to read config when already positioned at the telemetry_policy declarative block. |
| dynamic-control/src/main/java/io/opentelemetry/contrib/dynamic/policy/registry/PolicyInit.java | Introduces central initialization/activation logic for the policy pipeline (type resolution, initializers, provider activation, merging). |
| dynamic-control/src/main/java/io/opentelemetry/contrib/dynamic/policy/OpampPolicyProvider.java | Changes resetForTest() visibility to public. |
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
LikeTheSalad
approved these changes
May 12, 2026
jaydeluca
approved these changes
May 13, 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:
This adds PolicyInit which coordinates registration and initialization of policies when the policy pipeline is created
Existing Issue(s):
#2546
Testing:
The natural testing here is coordinated with at least one basic policy, but the policy registration hasn't yet been implemented in this PR (to keep it simpler), so testing will be added with the next PR with a policy registration added
Documentation:
Included
Outstanding items:
Wiring up the policy pipeline:
Steps needed for the wiring: