Code review sweep (run 24948463943)#18307
Merged
Merged
Conversation
Automated code review of instrumentation/aws-sdk/aws-sdk-2.2/javaagent.
Automated code review of instrumentation/aws-sdk/aws-sdk-2.2/library.
Automated code review of instrumentation/aws-sdk/aws-sdk-2.2/testing.
trask
approved these changes
Apr 26, 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.
Automated code review sweep walked the following modules in order
and stopped after accumulating at least 10 modified files:
aws-sdk-2.2:javaagentaws-sdk-2.2:libraryaws-sdk-2.2:library-autoconfigureaws-sdk-2.2:testingModule:
aws-sdk-2.2:javaagentModule path:
instrumentation/aws-sdk/aws-sdk-2.2/javaagentSummary
Reviewed
instrumentation/aws-sdk/aws-sdk-2.2/javaagent, verified the scoped module'smetadata.yamlentries against in-repo config usage, and applied safe singleton-pattern fixes in the javaagent sources.Applied Changes
Style
File:
AwsSdkSingletons.java:13Change: Renamed the private singleton field from `TELEMETRY` to `telemetry` and kept the `telemetry()` accessor aligned with it.
Reason: Repository singleton guidance requires exported collaborator fields to use lower camel case, and the style guide reserves uppercase names for constant-like values rather than runtime-created collaborator objects.
File:
DefaultBedrockRuntimeAsyncClientBuilderInstrumentation.java:8Change: Replaced the qualified `AwsSdkSingletons.telemetry()` call with a static import and unqualified `telemetry()` usage.
Reason: `javaagent-singletons-patterns.md` says callers should static import exported singleton accessors and use them unqualified instead of qualifying them with the holder class.
File:
DefaultSqsAsyncClientBuilderInstrumentation.java:8Change: Replaced the qualified `AwsSdkSingletons.telemetry()` call with a static import and unqualified `telemetry()` usage.
Reason: `javaagent-singletons-patterns.md` says callers should static import exported singleton accessors and use them unqualified instead of qualifying them with the holder class.
File:
DefaultSqsClientBuilderInstrumentation.java:8Change: Replaced the qualified `AwsSdkSingletons.telemetry()` call with a static import and unqualified `telemetry()` usage.
Reason: `javaagent-singletons-patterns.md` says callers should static import exported singleton accessors and use them unqualified instead of qualifying them with the holder class.
File:
TracingExecutionInterceptor.java:8Change: Replaced the qualified `AwsSdkSingletons.telemetry()` call with a static import and unqualified `telemetry()` usage for the interceptor delegate.
Reason: `javaagent-singletons-patterns.md` says callers should static import exported singleton accessors and use them unqualified instead of qualifying them with the holder class.
Module:
aws-sdk-2.2:libraryModule path:
instrumentation/aws-sdk/aws-sdk-2.2/librarySummary
Updated
Aws2BedrockRuntimeTestto use exact Bedrock span attribute assertions while still handling dynamic values such as request IDs, URLs, and ports.Applied Changes
Testing
File:
Aws2BedrockRuntimeTest.java:164Change: Replaced partial `hasAttributesSatisfying(...)` span checks with exact helper-backed assertions for the Bedrock no-message-content scenarios.
Reason: Repository testing guidance requires `hasAttributesSatisfyingExactly(...)` instead of `hasAttributesSatisfying(...)` because the non-exact variant can hide unexpected span attributes; the helper keeps those exact assertions deterministic for dynamic fields.
Module:
aws-sdk-2.2:library-autoconfigureModule path:
instrumentation/aws-sdk/aws-sdk-2.2/library-autoconfigureSummary
No safe repository-guideline fixes were needed under
instrumentation/aws-sdk/aws-sdk-2.2/library-autoconfigure; the reviewed sources and the AWS SDK module'smetadata.yamlusage were already consistent with the loaded review rules.Applied Changes
No safe automated changes were applied.
Module:
aws-sdk-2.2:testingModule path:
instrumentation/aws-sdk/aws-sdk-2.2/testingSummary
Applied 8 safe review fixes under
instrumentation/aws-sdk/aws-sdk-2.2/testing: shared async test paths now usejoin(), deterministic checked test exceptions were removed where possible, and JUnit helper visibility/suppression scope now matches repository guidance.Applied Changes
Testing
File:
AbstractAws2BedrockRuntimeTest.java:671Change: Replaced async response `.get()` waits with `.join()` and removed the corresponding checked `throws` clauses from Bedrock streaming tests.
Reason: `testing-general-patterns.md` says test methods should avoid multi-exception `throws` clauses and prefer `join()` over `Future.get()` when the test only blocks on async completion.
File:
AbstractAws2ClientCoreTest.java:318Change: Updated the shared `wrapClient(...)` async proxy helper to return `CompletableFuture.join()` results instead of `get()`.
Reason: The shared testing helper followed the same `testing-general-patterns.md` guidance to prefer `join()` in tests, which removes checked exception handling from async test call sites.
File:
AbstractAws2ClientTest.java:465Change: Changed async S3 helpers to use `CompletableFuture` with `join()`, and replaced SQS `Callable<HttpResponse>` suppliers with `Supplier<HttpResponse>` so the parameterized tests no longer need broad checked `throws` clauses.
Reason: `testing-general-patterns.md` says test entry points should keep checked `throws` clauses to a single specific type when possible and prefer `join()` over `Future.get()` for async waits.
File:
AbstractAws2SqsBaseTest.java:117Change: Switched deterministic endpoint creation to `URI.create(...)`, removed the resulting `URISyntaxException` declarations, and converted async SQS waits from `.get()` to `.join()`.
Reason: `testing-general-patterns.md` favors removing unnecessary checked test exceptions, and `URI.create(...)` is the safe non-checked form for these fixed local test URLs.
File:
AbstractAws2SqsSuppressReceiveSpansTest.java:98Change: Dropped the now-unneeded `URISyntaxException` declaration from the SQS batch test.
Reason: After the shared SQS client helper stopped throwing a checked URI exception, `testing-general-patterns.md` calls for removing unnecessary checked `throws` clauses from test methods.
File:
AbstractAws2SqsTracingTest.java:235Change: Dropped the now-unneeded `URISyntaxException` declarations from the SQS tracing tests.
Reason: These tests no longer call a checked-throwing helper, so `testing-general-patterns.md` favors removing the redundant checked `throws` clauses.
Style
File:
AbstractAws2ClientRecordHttpErrorTest.java:65Change: Tightened helper visibility, made `httpErrorMessages` `final`, and removed the redundant class-level `@SuppressWarnings` in favor of the existing method-scoped suppression.
Reason: The style guide requires minimal necessary visibility and `final` fields where possible, and `general-rules.md` prefers method-level `@SuppressWarnings` when only one method needs the suppression.
File:
AbstractQueryProtocolModelTest.java:39Change: Made the JUnit lifecycle methods package-private.
Reason: The style guide's JUnit section says test classes and methods should generally use package-private visibility to follow minimal-visibility conventions.
Download code review diagnostics