Skip to content

[dynamic control] add OpampPolicyProvider for the policy pipeline#2748

Merged
trask merged 4 commits intoopen-telemetry:mainfrom
jackshirazi:policy20
Apr 8, 2026
Merged

[dynamic control] add OpampPolicyProvider for the policy pipeline#2748
trask merged 4 commits intoopen-telemetry:mainfrom
jackshirazi:policy20

Conversation

@jackshirazi
Copy link
Copy Markdown
Contributor

Description:

OpampPolicyProvider is one possible input to the telemetry policy pipeline. OpampPolicyProvider (and test) is added in this PR

FilePolicyProvider -----\
HttpPolicyProvider ----- \  
OpampPolicyProvider ----- > PolicyStore --> PolicyImplementers
CustomProvider ----/

Support for changing the OpAMP polling interval is included for a policy to be added in the future that let's that value be changed dynamically

Existing Issue(s):

#2546

Testing:

added

Documentation:

Added in the class

Outstanding items:

wiring up the policy pipeline, PRs to come

@jackshirazi jackshirazi requested a review from a team as a code owner April 7, 2026 21:57
Copilot AI review requested due to automatic review settings April 7, 2026 21:57
@github-actions github-actions bot requested a review from LikeTheSalad April 7, 2026 21:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an OpAMP-backed PolicyProvider implementation to the dynamic-control telemetry policy pipeline, enabling policies to be sourced from OpAMP remote config (with a configurable polling interval hook for future dynamic updates).

Changes:

  • Added OpampPolicyProvider to subscribe to OpAMP remote config, parse payloads into TelemetryPolicy instances, and publish updates.
  • Added unit tests covering endpoint/service identity helpers and polling interval reset behavior.
  • Added opamp-client and OkHttp dependencies to the dynamic-control module.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.

File Description
dynamic-control/src/main/java/io/opentelemetry/contrib/dynamic/policy/OpampPolicyProvider.java New OpAMP-based policy provider with polling, parsing, mapping, validation, and update callbacks.
dynamic-control/src/test/java/io/opentelemetry/contrib/dynamic/policy/OpampPolicyProviderTest.java Unit tests for endpoint normalization, service identity resolution, and polling interval reset.
dynamic-control/build.gradle.kts Adds dependencies required by the OpAMP policy provider.

jackshirazi and others added 2 commits April 7, 2026 23:04
…/policy/OpampPolicyProvider.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…/policy/OpampPolicyProvider.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@trask trask added this pull request to the merge queue Apr 8, 2026
Merged via the queue into open-telemetry:main with commit d79c574 Apr 8, 2026
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants