Skip to content

[dynamic control] Add PolicyTypeInitializer interface for better readability#2754

Merged
jaydeluca merged 3 commits intoopen-telemetry:mainfrom
jackshirazi:policy24
Apr 13, 2026
Merged

[dynamic control] Add PolicyTypeInitializer interface for better readability#2754
jaydeluca merged 3 commits intoopen-telemetry:mainfrom
jackshirazi:policy24

Conversation

@jackshirazi
Copy link
Copy Markdown
Contributor

Description:

Adds a PolicyTypeInitializer to make initialization more readable, refers to PolicyInit class that is not yet implemented but is planned

Existing Issue(s):

#2546

Testing:

N/A

Documentation:

Added

Outstanding items:

When registering a policy type implementation, the implementation needs to be linked to the policy type name, it needs to be initialized only when the policy type is configured but not otherwise, and needs to be linked to the policy type implementer. Having PolicyTypeInitializer makes that straightforward and readable (I went through a bunch of unreadable Function and factories before settling on a nice simple choice)

Copilot AI review requested due to automatic review settings April 9, 2026 14:57
@jackshirazi jackshirazi requested a review from a team as a code owner April 9, 2026 14:57
@github-actions github-actions Bot requested a review from LikeTheSalad April 9, 2026 14: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 a PolicyTypeInitializer functional interface intended to make policy type initialization wiring clearer within the dynamic-control policy framework.

Changes:

  • Introduces PolicyTypeInitializer interface returning a PolicyImplementer from an AutoConfigurationCustomizer.
  • Adds Javadoc describing intended usage via a policy type registration helper.

@jaydeluca jaydeluca added this pull request to the merge queue Apr 13, 2026
Merged via the queue into open-telemetry:main with commit d509dd4 Apr 13, 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