Skip to content

[dynamic control] clean up unneeded code#3004

Merged
breedx-splk merged 2 commits into
open-telemetry:mainfrom
jackshirazi:policy-phase2-20
Jul 22, 2026
Merged

[dynamic control] clean up unneeded code#3004
breedx-splk merged 2 commits into
open-telemetry:mainfrom
jackshirazi:policy-phase2-20

Conversation

@jackshirazi

Copy link
Copy Markdown
Contributor

Description:

Clean up after TelemetryPolicy source prioritization was done

Existing Issue(s):

#2868

Testing:

applied as needed

Documentation:

not needed

Outstanding items:

#2868

@jackshirazi
jackshirazi requested a review from a team as a code owner July 20, 2026 17:20
Copilot AI review requested due to automatic review settings July 20, 2026 17:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.

Cleans up dynamic-control telemetry policy APIs after source-prioritization work by removing temporary defaults/overloads and updating tests accordingly.

Changes:

  • Removed temporary convenience constructors that defaulted SourceKind to CUSTOM.
  • Made TelemetryPolicy#getSourceKind() non-default, requiring explicit implementation.
  • Updated affected tests to pass SourceKind explicitly.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
dynamic-control/src/main/java/io/opentelemetry/contrib/dynamic/policy/TelemetryPolicy.java Removes default getSourceKind() implementation so source is always explicit.
dynamic-control/src/main/java/io/opentelemetry/contrib/dynamic/policy/tracesampling/TraceSamplingRatePolicy.java Removes temporary constructor overload that implied SourceKind.CUSTOM.
dynamic-control/src/main/java/io/opentelemetry/contrib/dynamic/policy/DeletedTelemetryPolicy.java Removes temporary constructor overload that implied SourceKind.CUSTOM.
dynamic-control/src/test/java/io/opentelemetry/contrib/dynamic/policy/tracesampling/TraceSamplingRatePolicyTest.java Updates tests to use the new explicit SourceKind constructor.
dynamic-control/src/test/java/io/opentelemetry/contrib/dynamic/policy/tracesampling/TraceSamplingRatePolicyImplementerTest.java Updates tests to construct deleted/sampling policies with explicit SourceKind.
dynamic-control/src/test/java/io/opentelemetry/contrib/dynamic/policy/PolicyStoreTest.java Updates tests to pass explicit SourceKind in policy snapshots.
dynamic-control/src/test/java/io/opentelemetry/contrib/dynamic/policy/DeletedTelemetryPolicyTest.java Updates test to use the new explicit SourceKind constructor.

@breedx-splk breedx-splk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me, thanks for circling back!

@breedx-splk
breedx-splk added this pull request to the merge queue Jul 22, 2026
Merged via the queue into open-telemetry:main with commit c4236fb Jul 22, 2026
25 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.

3 participants