Skip to content

Code review sweep (run 25089213030)#18398

Merged
trask merged 7 commits into
mainfrom
otelbot/code-review-sweep-25089213030
Apr 29, 2026
Merged

Code review sweep (run 25089213030)#18398
trask merged 7 commits into
mainfrom
otelbot/code-review-sweep-25089213030

Conversation

@otelbot

@otelbot otelbot Bot commented Apr 29, 2026

Copy link
Copy Markdown
Contributor

Automated code review sweep walked the following modules in order
and stopped after accumulating at least 10 modified files:

  • spring-webmvc-6.0:javaagent
  • spring-webmvc-6.0:library
  • spring-webmvc-common:javaagent
  • spring-webmvc-common:testing
  • spring-ws-2.0:javaagent
  • spring-ws-2.0:testing
  • starters:spring-boot-starter
  • starters:zipkin-spring-boot-starter
  • spymemcached-2.12:javaagent
  • struts-2.3:javaagent

Module: spring-webmvc-6.0:javaagent

Module path: instrumentation/spring/spring-webmvc/spring-webmvc-6.0/javaagent

Summary

Applied safe repository-guideline fixes in spring-webmvc-6.0 javaagent and committed them.

Applied Changes

Build

File: build.gradle.kts:51
Change: Added `metadataConfig` for the default test configuration and expanded `testExperimental` metadata to include the always-enabled common controller and view telemetry flags.
Reason: `gradle-conventions.md` requires `metadataConfig` to describe non-default JVM/system configuration when `collectMetadata` is present, including custom test tasks and shared `Test` task configuration.

Nullability

File: DispatcherServletInstrumentation.java:60
Change: Annotated the ByteBuddy `@Advice.FieldValue("handlerMappings")` parameter as `@Nullable`.
Reason: Repository nullability rules require parameters to be annotated `@Nullable` when a concrete runtime source can provide `null`; the advised `handlerMappings` field is explicitly guarded for `null`.

Module: spring-webmvc-6.0:library

Module path: instrumentation/spring/spring-webmvc/spring-webmvc-6.0/library

Summary

Applied one safe repository-guideline fix and committed it for spring-webmvc-6.0 library.

Applied Changes

Style

File: TestWebSpringBootApp.java:76
Change: Renamed test controller handler methods from underscore style to lower camel case: `queryParam`, `captureHeaders`, `pathParam`, and `indexedChild`.
Reason: Repository style follows Google Java Style, which uses lower-camel method names; this test-only rename is deterministic and preserves Spring `@RequestMapping` behavior.

Module: spring-webmvc-common:javaagent

Module path: instrumentation/spring/spring-webmvc/spring-webmvc-common/javaagent

Summary

Applied and committed one safe review fix for spring-webmvc-common javaagent.

Applied Changes

Style

File: HandlerCodeAttributesGetter.java:20
Change: Removed unnecessary `@Nullable` annotations from non-null `getCodeClass()` and `getMethodName()` overrides, and renamed the unused `ClassNotFoundException` catch parameter to `ignored`.
Reason: Repository nullability guidance says return types should be annotated `@Nullable` only when the implementation can return `null`; catch-variable naming guidance says intentionally unused catch parameters should use `ignored`.

Module: spring-webmvc-common:testing

Module path: instrumentation/spring/spring-webmvc/spring-webmvc-common/testing

Summary

Applied and committed one safe repository-guideline fix in spring-webmvc-common/testing.

Applied Changes

Testing

File: AbstractSpringBootBasedTest.java:58
Change: Replaced the `EXPERIMENTAL_SPAN_CONFIG` string constant plus repeated `Boolean.getBoolean(...)` lookup with a module-level `EXPERIMENTAL_ATTRIBUTES` boolean constant.
Reason: `testing-general-patterns.md` requires experimental test flags to be read through a shared per-module `EXPERIMENTAL_ATTRIBUTES` constant instead of duplicating property-name lookups at assertion sites.

Module: spring-ws-2.0:javaagent

Module path: instrumentation/spring/spring-ws-2.0/javaagent

Summary

Applied safe repository-guideline fixes for spring-ws-2.0 javaagent internals and committed them in 7ec3ad72.

Applied Changes

Style

File: SpringWsCodeAttributesGetter.java:10
Change: Changed `SpringWsCodeAttributesGetter` from `public` to package-private.
Reason: The style guide requires minimal necessary visibility; this javaagent helper is internal and only used within its package.

File: SpringWsRequest.java:11
Change: Changed `SpringWsRequest` and its factory/accessor methods from `public` to package-private.
Reason: The style guide requires minimal necessary visibility; this javaagent value type is internal and only used within its package.

Module: spring-ws-2.0:testing

Module path: instrumentation/spring/spring-ws-2.0/testing

Summary

No safe repository-guideline fixes were applied under instrumentation/spring/spring-ws-2.0/testing; the tracked files already match the relevant testing-module, Gradle, style, and metadata.yaml guidance.

Applied Changes

No safe automated changes were applied.

Module: starters:spring-boot-starter

Module path: instrumentation/spring/starters/spring-boot-starter

Summary

No safe repository-guideline fixes were applied; reviewed the scoped starter files and found no deterministic in-scope issue to change.

Applied Changes

No safe automated changes were applied.

Module: starters:zipkin-spring-boot-starter

Module path: instrumentation/spring/starters/zipkin-spring-boot-starter

Summary

No safe repository-guideline fixes were found in reviewable files under instrumentation/spring/starters/zipkin-spring-boot-starter. README.md was skipped per review rules for Markdown files, and build.gradle.kts already follows the applicable Gradle conventions reviewed.

Applied Changes

No safe automated changes were applied.

Module: spymemcached-2.12:javaagent

Module path: instrumentation/spymemcached-2.12/javaagent

Summary

Applied safe repository-guideline fixes under instrumentation/spymemcached-2.12/javaagent and committed them in 5175810a.

Applied Changes

Style

File: MemcachedClientInstrumentation.java:170
Change: Annotated `Handler.create(...)` and its implementations with `@Nullable`.
Reason: Repository nullability rules require `@Nullable` on return types that can actually return `null`; these factories delegate to `CompletionListener.create(...)` methods that return `null` when `instrumenter().shouldStart(...)` is false.

Testing

File: SpymemcachedTest.java:78
Change: Renamed the experimental flag constant to `EXPERIMENTAL_ATTRIBUTES` and replaced repeated `EXPERIMENTAL_ATTRIBUTES ? value : null` assertions with an `experimental(...)` helper.
Reason: `testing-experimental-flags.md` recommends a per-class `EXPERIMENTAL_ATTRIBUTES` constant and a single-arg `experimental(value)` helper when several assertions gate experimental attributes with `null` for absent values.

Module: struts-2.3:javaagent

Module path: instrumentation/struts/struts-2.3/javaagent

Summary

Applied and committed two safe review fixes for struts-2.3 javaagent metadata and Gradle task configuration.

Applied Changes

Config

File: metadata.yaml:11
Change: Added `declarative_name: java.common.controller_telemetry/development.enabled` for `otel.instrumentation.common.experimental.controller-telemetry.enabled`.
Reason: `metadata-yaml-format.md` requires each configuration entry to include a matching `declarative_name`; the `/development` marker matches the `experimental` flat property segment.

Build

File: build.gradle.kts:31
Change: Changed `tasks.withType<Test>().configureEach` to `tasks.test` for the module test configuration.
Reason: `gradle-conventions.md` says single-test-task modules should use `tasks.test`; implicit `latestDepTest` does not justify `withType<Test>().configureEach`.

Unresolved Items

File: build.gradle.kts
Reason: The experimental `otel.instrumentation.common.experimental.controller-telemetry.enabled` flag is still enabled on the default `test` task. Review instructions say not to auto-fix missing `testExperimental` task wiring; the next action is to decide how to split or gate controller-span assertions before moving this flag to a dedicated `testExperimental` task.


Download code review diagnostics

otelbot Bot added 7 commits April 29, 2026 03:32
Automated code review of instrumentation/spring/spring-webmvc/spring-webmvc-6.0/javaagent.
Automated code review of instrumentation/spring/spring-webmvc/spring-webmvc-6.0/library.
Automated code review of instrumentation/spring/spring-webmvc/spring-webmvc-common/javaagent.
Automated code review of instrumentation/spring/spring-webmvc/spring-webmvc-common/testing.
Automated code review of instrumentation/spring/spring-ws-2.0/javaagent.
Automated code review of instrumentation/spymemcached-2.12/javaagent.
Automated code review of instrumentation/struts/struts-2.3/javaagent.
@otelbot otelbot Bot requested a review from a team as a code owner April 29, 2026 04:05
@trask trask merged commit 8b60fef into main Apr 29, 2026
96 checks passed
@trask trask deleted the otelbot/code-review-sweep-25089213030 branch April 29, 2026 04:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant