[dynamic control] clean up unneeded code#3004
Merged
Merged
Conversation
25 tasks
Contributor
There was a problem hiding this comment.
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
SourceKindtoCUSTOM. - Made
TelemetryPolicy#getSourceKind()non-default, requiring explicit implementation. - Updated affected tests to pass
SourceKindexplicitly.
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
approved these changes
Jul 22, 2026
breedx-splk
left a comment
Contributor
There was a problem hiding this comment.
Looks good to me, thanks for circling back!
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:
Clean up after TelemetryPolicy source prioritization was done
Existing Issue(s):
#2868
Testing:
applied as needed
Documentation:
not needed
Outstanding items:
#2868