Code review sweep (run 25203544834)#18479
Merged
Merged
Conversation
Automated code review of instrumentation/netty/netty-4.1/library.
Automated code review of instrumentation/netty/netty-4.1/testing.
Automated code review of instrumentation/netty/netty-common-4.0/library.
Automated code review of instrumentation/netty/netty-common/library.
Automated code review of instrumentation/okhttp/okhttp-2.2/javaagent.
Automated code review of instrumentation/okhttp/okhttp-3.0/javaagent.
Automated code review of instrumentation/okhttp/okhttp-3.0/library.
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:
netty-4.1:librarynetty-4.1:testingnetty-common-4.0:javaagentnetty-common-4.0:librarynetty-common:libraryokhttp-2.2:javaagentokhttp-3.0:javaagentokhttp-3.0:libraryModule:
netty-4.1:libraryModule path:
instrumentation/netty/netty-4.1/librarySummary
Applied 1 safe repository-guideline fix: added required
declarative_namemappings to Netty 4.1metadata.yaml.Applied Changes
Config
File:
metadata.yaml:13Change: Added `declarative_name` entries for all configuration items, including common HTTP mappings and Netty-specific `connection_telemetry` and `ssl_telemetry` paths.
Reason: `metadata-yaml-format.md` requires each configuration entry to include `declarative_name`, with special mappings for common HTTP and sanitization properties and standard conversion for module-specific `otel.instrumentation.netty.*` keys.
Module:
netty-4.1:testingModule path:
instrumentation/netty/netty-4.1/testingSummary
Applied one safe repository-guideline fix in
ClientHandler.javaand committed it asReview fixes for netty-4.1 testing.Applied Changes
Style
File:
ClientHandler.java:34Change: Changed `channelRead0(...)` from `public` to `protected`.
Reason: The style guide requires minimal necessary visibility; `SimpleChannelInboundHandler.channelRead0(...)` is a protected override point, so widening it to `public` exposes unnecessary API surface.
Module:
netty-common-4.0:javaagentModule path:
instrumentation/netty/netty-common-4.0/javaagentSummary
No safe repository-guideline fixes were found in
instrumentation/netty/netty-common-4.0/javaagent; no source files were changed.Applied Changes
No safe automated changes were applied.
Module:
netty-common-4.0:libraryModule path:
instrumentation/netty/netty-common-4.0/librarySummary
Applied safe style-guideline fixes in 3 files under
instrumentation/netty/netty-common-4.0/libraryand committed them in661c27d8.Applied Changes
Style
File:
HttpSchemeUtil.java:18Change: Renamed static final descriptor field `sslHandlerClass` to `SSL_HANDLER_CLASS`.
Reason: The style guide says constant-like static fields and immutable descriptors should use `SCREAMING_SNAKE_CASE`.
File:
NettyClientInstrumenterBuilderFactory.java:28Change: Moved the private utility constructor after the static factory method `create(...)`.
Reason: The style guide says static utility classes should place the private constructor after all methods.
File:
NettySslInstrumentationHandler.java:32Change: Renamed static final `VirtualField` handle `instrumentationHandlerField` to `INSTRUMENTATION_HANDLER_FIELD` and unused catch parameters to `ignored`.
Reason: The style guide treats `VirtualField` handles as constant-like fields, and general review rules prefer `ignored` for intentionally unused catch parameters.
Module:
netty-common:libraryModule path:
instrumentation/netty/netty-common/librarySummary
Applied and committed one safe style-guide fix under
instrumentation/netty/netty-common/library.Applied Changes
Style
File:
Timer.java:22Change: Moved `Timer` instance fields above the `start()` static factory method.
Reason: Repository style guide class organization places instance fields before constructors and methods, with static factory entry points below fields.
Module:
okhttp-2.2:javaagentModule path:
instrumentation/okhttp/okhttp-2.2/javaagentSummary
Applied and committed safe review fixes for
okhttp-2.2javaagent: nullable advice throwable metadata and missingdeclarative_namecoverage.Applied Changes
Javaagent
File:
DispatcherInstrumentation.java:53Change: Annotated the `@Advice.Thrown` `Throwable` parameter with `@Nullable`.
Reason: `@Advice.Thrown` is `null` when the instrumented method exits normally, and repository nullability guidance requires parameters that can be `null` to be annotated accurately.
Config
File:
metadata.yaml:25Change: Added `declarative_name: java.common.peer_service_mapping` for `otel.instrumentation.common.peer-service-mapping`.
Reason: `metadata.yaml` format guidance requires configuration entries to include the matching declarative config key; standard conversion maps this common instrumentation property to `java.common.peer_service_mapping`.
Module:
okhttp-3.0:javaagentModule path:
instrumentation/okhttp/okhttp-3.0/javaagentSummary
Applied one safe metadata-guideline fix for the
okhttp-3.0instrumentation review and committed it.Applied Changes
Config
File:
metadata.yaml:26Change: Added `declarative_name: java.common.peer_service_mapping` for `otel.instrumentation.common.peer-service-mapping`.
Reason: `metadata-yaml-format.md` requires each instrumentation configuration entry to include the declarative YAML key; the sibling OkHttp metadata and standard conversion map this property to `java.common.peer_service_mapping`.
Module:
okhttp-3.0:libraryModule path:
instrumentation/okhttp/okhttp-3.0/librarySummary
Applied 2 safe repository-guideline fixes under
instrumentation/okhttp/okhttp-3.0/libraryand committed them ine59ac800.Applied Changes
Style
File:
TracingCallFactory.java:36Change: Renamed unused catch variables from `e` to `ignored` in `NoSuchMethodException` and reflective invocation catch blocks.
Reason: `knowledge/general-rules.md` catch-variable guidance says intentionally unused catch parameters should be named `ignored`.
General
File:
TracingInterceptor.java:55Change: Replaced a stale context-injection comment that referenced `Instrumenter<Request, Response>` with an accurate explanation that `OkHttp` `Request` is immutable.
Reason: `knowledge/general-rules.md` requires fixing incorrect comments; the old comment no longer matched the actual `Instrumenter<Chain, Response>` implementation.
Download code review diagnostics