[dynamic control] Create providers from SourceKind#2749
Merged
jaydeluca merged 5 commits intoopen-telemetry:mainfrom Apr 9, 2026
Merged
[dynamic control] Create providers from SourceKind#2749jaydeluca merged 5 commits intoopen-telemetry:mainfrom
jaydeluca merged 5 commits intoopen-telemetry:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds initial wiring to instantiate PolicyProvider implementations directly from SourceKind, enabling future policy pipeline setup for dynamic-control.
Changes:
- Extend
SourceKindwith a per-kind provider factory and acreateProvider(...)method. - Add
OPAMPprovider creation viaOpampPolicyProviderwhen a location key is provided. - Add unit tests covering provider creation behavior and null-argument validation.
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/source/SourceKind.java | Introduces provider factory dispatch on enum constants and adds OPAMP provider creation. |
| dynamic-control/src/test/java/io/opentelemetry/contrib/dynamic/policy/source/SourceKindTest.java | Adds tests for createProvider(...) behavior across kinds and argument validation. |
dynamic-control/src/main/java/io/opentelemetry/contrib/dynamic/policy/source/SourceKind.java
Show resolved
Hide resolved
dynamic-control/src/main/java/io/opentelemetry/contrib/dynamic/policy/source/SourceKind.java
Show resolved
Hide resolved
…/policy/source/SourceKind.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
LikeTheSalad
approved these changes
Apr 9, 2026
jaydeluca
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:
This adds getting PolicyProviders of specific implementations from SourceKind
Existing Issue(s):
#2546
Testing:
Added
Documentation:
To be added
Outstanding items:
Wiring up the policy pipeline:
Steps needed for the wiring: