Code review sweep (run 25201305534)#18477
Merged
Merged
Conversation
Automated code review of instrumentation/mongo/mongo-common/testing.
Automated code review of instrumentation/mybatis-3.2/javaagent.
Automated code review of instrumentation/nats/nats-2.17/javaagent.
Automated code review of instrumentation/nats/nats-2.17/testing.
Automated code review of instrumentation/netty/netty-3.8/javaagent.
Automated code review of instrumentation/netty/netty-4.0/javaagent.
Automated code review of instrumentation/netty/netty-4.1/javaagent.
trask
approved these changes
May 1, 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:
mongo-async-3.3:javaagentmongo-common:testingmybatis-3.2:javaagentnats-2.17:javaagentnats-2.17:librarynats-2.17:testingnetty-3.8:javaagentnetty-4.0:javaagentnetty-4.1:javaagentModule:
mongo-async-3.3:javaagentModule path:
instrumentation/mongo/mongo-async-3.3/javaagentSummary
Reviewed all reviewable files under
instrumentation/mongo/mongo-async-3.3/javaagent; no safe repository-guideline fixes were needed.Applied Changes
No safe automated changes were applied.
Module:
mongo-common:testingModule path:
instrumentation/mongo/mongo-common/testingSummary
Applied one safe review fix and committed it as
99bb6032(Review fixes for mongo-common testing).Applied Changes
Semconv
File:
AbstractMongoClientTest.java:50Change: Moved the existing `@SuppressWarnings("deprecation")` for deprecated database semconv usage from `mongoSpan(...)` to the `AbstractMongoClientTest` class.
Reason: `testing-semconv-stability.md` requires class-level `@SuppressWarnings("deprecation")` when tests use old semconv constants; the existing explanatory `TODO DB_CONNECTION_STRING deprecation` comment was preserved per the suppression guidance.
Module:
mybatis-3.2:javaagentModule path:
instrumentation/mybatis-3.2/javaagentSummary
Applied and committed safe repository-guideline fixes for
instrumentation/mybatis-3.2/javaagent. Module:instrumentation:mybatis-3.2:javaagent:check,:instrumentation:mybatis-3.2:javaagent:check -PtestLatestDeps=true, and final./gradlew spotlessApplycompleted successfully.Applied Changes
Style
File:
SqlCommandUtil.java:15Change: Renamed the private static `VirtualField` handle from `field` to `FIELD` and updated its references.
Reason: The repository style guide says constant-like semantic handles such as `VirtualField` should use `SCREAMING_SNAKE_CASE`, not lower camel case collaborator naming.
Testing
File:
TestMapper.java:10Change: Reduced `TestMapper` from `public interface` to package-private `interface`.
Reason: The testing guidance and style guide prefer package-private test classes and test support types when public visibility is not required.
Module:
nats-2.17:javaagentModule path:
instrumentation/nats/nats-2.17/javaagentSummary
Applied and committed one safe review fix for
instrumentation/nats/nats-2.17/javaagent: alignedcollectMetadatatest configuration with the single-Test-task Gradle convention and keptassertInverseadjacent toversionsin themuzzleblock.Applied Changes
Build
File:
build.gradle.kts:23Change: Moved `systemProperty("collectMetadata", otelProps.collectMetadata)` from `withType<Test>().configureEach` into the default `test` task and removed the blank line between `versions.set(...)` and `assertInverse.set(true)`.
Reason: `gradle-conventions.md` requires `collectMetadata` to be configured on `tasks.test` for single-test-task modules, and muzzle `assertInverse.set(true)` should be placed immediately after `versions.set(...)` when no `skip` is present.
Module:
nats-2.17:libraryModule path:
instrumentation/nats/nats-2.17/librarySummary
No safe repository-guideline fixes were applied under
instrumentation/nats/nats-2.17/library; reviewed source, test, Gradle, and mandatorymetadata.yamlcoverage with no in-scope deterministic issues found.Applied Changes
No safe automated changes were applied.
Module:
nats-2.17:testingModule path:
instrumentation/nats/nats-2.17/testingSummary
Applied safe repository-guideline cleanup fixes in
nats-2.17testing and committed them asa316df7b.Applied Changes
Testing
File:
AbstractNatsPublishTest.java:28Change: Replaced separate `@AfterEach` subscription draining with `cleanup.deferCleanup(...)` registered in `beforeEach()`.
Reason: The testing cleanup guideline prefers `AutoCleanupExtension.deferCleanup(...)` next to per-test resource creation instead of a separate teardown method that re-references the field.
File:
AbstractNatsRequestTest.java:42Change: Registered subscription draining and dispatcher closing with `cleanup.deferCleanup(...)` at creation sites, removing separate `@AfterEach`, manual close calls, and completion-callback cleanup.
Reason: The testing cleanup guideline prefers `AutoCleanupExtension.deferCleanup(...)` for resources intended to live until test end, keeping creation and cleanup together and ensuring cleanup runs regardless of test outcome.
Module:
netty-3.8:javaagentModule path:
instrumentation/netty/netty-3.8/javaagentSummary
Applied safe style fixes in
netty-3.8javaagent and committed them as65c64129.Applied Changes
Style
File:
NettyHttpClientAttributesGetter.java:36Change: Renamed the unused `URISyntaxException` catch parameter from `e` to `ignored`.
Reason: Repository catch-variable convention in `knowledge/general-rules.md` says intentionally unused catch parameters should be named `ignored`.
File:
Netty38ClientTest.java:53Change: Renamed unused `NoSuchMethodException` catch parameters from `e` to `ignored`.
Reason: Repository catch-variable convention in `knowledge/general-rules.md` says intentionally unused catch parameters should be named `ignored`.
Module:
netty-4.0:javaagentModule path:
instrumentation/netty/netty-4.0/javaagentSummary
Applied one safe metadata-format fix for the
netty-4.0instrumentation and committed it in3fec1ec8; no unresolved issues remain.Applied Changes
Config
File:
metadata.yaml:13Change: Added `declarative_name` mappings for all documented configuration entries, including common HTTP settings, Netty `connection_telemetry`/`ssl_telemetry`, and URL sanitization config.
Reason: `metadata-yaml-format.md` requires instrumentation metadata entries to include valid declarative config names, and the mandatory metadata validation for instrumentation modules requires flat `otel.instrumentation.*` properties to map to the corresponding declarative paths.
Module:
netty-4.1:javaagentModule path:
instrumentation/netty/netty-4.1/javaagentSummary
Applied and committed safe review fixes for
instrumentation/netty/netty-4.1/javaagent.Applied Changes
Javaagent
File:
InstrumentedAddressResolverGroup.java:52Change: Changed `newResolver(...)` to return an instrumented delegate resolver instead of throwing `UnsupportedOperationException`.
Reason: Repository javaagent guidance says javaagent instrumentation/helper code should not throw instrumentation-originated exceptions; delegating preserves resolver behavior without an impossible-path throw.
Testing
File:
ChannelPipelineTest.java:78Change: Replaced zero-size assertions like `assertThat(channelPipeline.toMap()).hasSize(0)` with `assertThat(channelPipeline.toMap()).isEmpty()`.
Reason: `testing-general-patterns.md` prefers AssertJ idiomatic collection assertions, including `isEmpty()` instead of `hasSize(0)`.
Download code review diagnostics