Skip to content

Code review sweep (run 25256350389)#18513

Merged
trask merged 9 commits into
mainfrom
otelbot/code-review-sweep-25256350389
May 2, 2026
Merged

Code review sweep (run 25256350389)#18513
trask merged 9 commits into
mainfrom
otelbot/code-review-sweep-25256350389

Conversation

@otelbot

@otelbot otelbot Bot commented May 2, 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-webflux-5.3:testing
  • spring-webflux-5.3:testing-webflux7
  • spring-webmvc-3.1:javaagent
  • spring-webmvc-3.1:wildfly-testing
  • spring-webmvc-5.3:library
  • 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
  • struts-7.0:javaagent
  • tapestry-5.4:javaagent
  • tomcat-10.0:javaagent

Module: spring-webflux-5.3:testing

Module path: instrumentation/spring/spring-webflux/spring-webflux-5.3/testing

Summary

No safe repository-guideline fixes were found under instrumentation/spring/spring-webflux/spring-webflux-5.3/testing; no files were changed.

Applied Changes

No safe automated changes were applied.

Module: spring-webflux-5.3:testing-webflux7

Module path: instrumentation/spring/spring-webflux/spring-webflux-5.3/testing-webflux7

Summary

Applied 1 safe repository-guideline fix under instrumentation/spring/spring-webflux/spring-webflux-5.3/testing-webflux7 and committed it.

Applied Changes

Style

File: Webflux7Util.java:21
Change: Renamed the unused `NoSuchMethodException` catch parameter from `e` to `ignored`.
Reason: `knowledge/general-rules.md` says used exceptions should be named `e`, while intentionally unused catch parameters should be named `ignored`.

Module: spring-webmvc-3.1:javaagent

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

Summary

Applied and committed safe review fixes for spring-webmvc-3.1 javaagent: aligned experimental test metadata wiring and corrected nullability annotations for nullable MethodHandle probes.

Applied Changes

Build

File: build.gradle.kts:51
Change: Added common experimental controller/view telemetry flags to `metadataConfig` for shared test configuration and included them in `testExperimental` metadata alongside `otel.instrumentation.spring-webmvc.experimental-span-attributes`.
Reason: `testing-experimental-flags.md` and `metadata-yaml-format.md` require experimental flags exercised by tests to be represented in `metadataConfig`; the sibling `spring-webmvc-6.0` module uses this canonical wiring.

Style

File: OpenTelemetryHandlerMappingFilter.java:44
Change: Annotated nullable `MethodHandle` fields and factory methods with `@Nullable`.
Reason: The nullability rule in `general-rules.md` requires fields and return types to be annotated when they can hold or return `null`; these optional Spring 5.3 probe lookups return `null` when classes or methods are unavailable.

Module: spring-webmvc-3.1:wildfly-testing

Module path: instrumentation/spring/spring-webmvc/spring-webmvc-3.1/wildfly-testing

Summary

No safe repository-guideline fixes were applied in the scoped wildfly-testing files; one experimental-test-task pattern was left for manual handling.

Applied Changes

No safe automated changes were applied.

Unresolved Items

File: build.gradle.kts
Reason: `test` unconditionally sets `-Dotel.instrumentation.common.experimental.controller-telemetry.enabled=true` without a dedicated `testExperimental` task. The review guideline says missing `testExperimental` coverage for experimental flags should be reported rather than auto-fixed when it requires assertion/task reshaping or intent confirmation.

Module: spring-webmvc-5.3:library

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

Summary

Applied 2 safe repository-guideline fixes under instrumentation/spring/spring-webmvc/spring-webmvc-5.3/library and committed them.

Applied Changes

Build

File: build.gradle.kts:30
Change: Changed `tasks.withType<Test>().configureEach` to `tasks.test` for the existing `collectMetadata` system property.
Reason: `gradle-conventions.md` says single-test-task modules should configure `collectMetadata` on `tasks.test`; `latestDepTest` does not justify `withType<Test>().configureEach`.

Style

File: TestWebSpringBootApp.java:141
Change: Renamed the unused `InterruptedException e` catch parameter to `ignored`.
Reason: `general-rules.md` catch-variable guidance says intentionally unused catch parameters should be named `ignored`.

Module: spring-webmvc-6.0:javaagent

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

Summary

No safe repository-guideline fixes were applied. Reviewed instrumentation/spring/spring-webmvc/spring-webmvc-6.0/javaagent source/build files and validated the module metadata.yaml entries against observed config usage; no deterministic changes were needed.

Applied Changes

No safe automated changes were applied.

Module: spring-webmvc-6.0:library

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

Summary

Applied 1 safe repository-guideline fix under instrumentation/spring/spring-webmvc/spring-webmvc-6.0/library and committed it as 236ff520.

Applied Changes

Build

File: build.gradle.kts:31
Change: Changed `withType<Test>().configureEach` to the single-task `test` block for the `testLatestDeps` system property.
Reason: `gradle-conventions.md` says `withType<Test>().configureEach` is only justified when the module explicitly registers additional `Test` tasks; `latestDepTest` does not count, so single-test-task modules should use `tasks.test`.

Module: spring-webmvc-common:javaagent

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

Summary

No safe repository-guideline fixes were needed under instrumentation/spring/spring-webmvc/spring-webmvc-common/javaagent. The reviewed source and build.gradle.kts matched the applicable style, javaagent, shared-module, singleton, nullability, and metadata/config guidelines.

Applied Changes

No safe automated changes were applied.

Module: spring-webmvc-common:testing

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

Summary

No safe repository-guideline fixes were applied. A potential @Nullable removal in FilteredAppConfig.java was tested and reverted because :instrumentation:spring:spring-webmvc:spring-webmvc-common:testing:check requires the annotation for the null collection return.

Applied Changes

No safe automated changes were applied.

Module: spring-ws-2.0:javaagent

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

Summary

Applied and committed one safe repository-guideline fix for spring-ws-2.0 javaagent.

Applied Changes

Style

File: AnnotatedMethodInstrumentation.java:28
Change: Renamed mutable static `String[]` field `ANNOTATION_CLASSES` to lower-camel-case `annotationClasses` and updated its references.
Reason: The repository style guide reserves `SCREAMING_SNAKE_CASE` for constant-like immutable values; mutable arrays should not use constant-style naming solely because they are `static final`.

Module: spring-ws-2.0:testing

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

Summary

No safe repository-guideline fixes were found in the tracked files under instrumentation/spring/spring-ws-2.0/testing. The owning metadata.yaml entry was reviewed for required declarative config format and did not need changes.

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 found in the reviewable files under instrumentation/spring/starters/spring-boot-starter; no changes were applied.

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 instrumentation/spring/starters/zipkin-spring-boot-starter. The reviewable build.gradle.kts already matches the applicable Gradle conventions, README.md is skipped by the review rules for non-CHANGELOG.md Markdown files, and no metadata.yaml exists in the targeted module.

Applied Changes

No safe automated changes were applied.

Module: spymemcached-2.12:javaagent

Module path: instrumentation/spymemcached-2.12/javaagent

Summary

No safe repository-guideline fixes were found in instrumentation/spymemcached-2.12/javaagent; no files were changed.

Applied Changes

No safe automated changes were applied.

Module: struts-2.3:javaagent

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

Summary

Applied one safe repository-guideline fix in struts-2.3 javaagent and committed it as 61fb8d44.

Applied Changes

Style

File: ActionInvocationInstrumentation.java:52
Change: Changed `AdviceScope(Context, Scope)` from `public` to `private`.
Reason: Repository style guide requires minimal necessary visibility; this constructor is only called by `AdviceScope.start(...)` inside the same nested class.

Module: struts-7.0:javaagent

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

Summary

Applied one safe repository-guideline fix under instrumentation/struts/struts-7.0/javaagent and committed it as 019ce544c0a10dbe5fc0d9567af393c00427e52d.

Applied Changes

Style

File: ActionInvocationInstrumentation.java:52
Change: Changed the nested `AdviceScope(Context, Scope)` constructor from `public` to `private`.
Reason: Repository style guide requires minimal necessary visibility; the constructor is only called from `AdviceScope.start(...)` inside the same class and matches the sibling Struts 2.3 pattern.

Module: tapestry-5.4:javaagent

Module path: instrumentation/tapestry-5.4/javaagent

Summary

No safe repository-guideline fixes were applied. One build.gradle.kts testing issue was identified but left unresolved because the review instructions classify missing testExperimental task wiring as report-only, not auto-fixable.

Applied Changes

No safe automated changes were applied.

Unresolved Items

File: build.gradle.kts
Reason: The default `test` task unconditionally enables `otel.instrumentation.common.experimental.controller-telemetry.enabled`; testing guidance expects experimental flags to be isolated in a dedicated `testExperimental` task, but the review auto-fix boundaries require reporting missing `testExperimental` wiring instead of applying it automatically.

Module: tomcat-10.0:javaagent

Module path: instrumentation/tomcat/tomcat-10.0/javaagent

Summary

Applied and committed safe javaagent review fixes for tomcat-10.0:javaagent; :check, :check -PtestLatestDeps=true, and spotlessApply completed successfully.

Applied Changes

Javaagent

File: Tomcat10InstrumentationModule.java:36
Change: Nested `Tomcat10AttachResponseAdvice` and `Tomcat10ServerHandlerAdvice` inside `Tomcat10InstrumentationModule`, updated advice class-name wiring to use `$` nested class names, and changed the landmark comment to `removed in 10.0.26`.
Reason: `javaagent-advice-patterns.md` requires ByteBuddy advice classes to be static nested classes inside the instrumentation class; `javaagent-module-patterns.md` requires version-boundary comments to identify ceiling classes with `removed in`.

File: Tomcat10AttachResponseAdvice.java:15
Change: Removed standalone `Tomcat10AttachResponseAdvice` after moving it into `Tomcat10InstrumentationModule`.
Reason: `javaagent-advice-patterns.md` requires ByteBuddy advice classes to be static nested classes inside the instrumentation class, not standalone top-level advice files.

File: Tomcat10ServerHandlerAdvice.java:19
Change: Removed standalone `Tomcat10ServerHandlerAdvice` after moving it into `Tomcat10InstrumentationModule`.
Reason: `javaagent-advice-patterns.md` requires ByteBuddy advice classes to be static nested classes inside the instrumentation class, not standalone top-level advice files.


Download code review diagnostics

otelbot Bot added 8 commits May 2, 2026 16:36
Automated code review of instrumentation/spring/spring-webflux/spring-webflux-5.3/testing-webflux7.
Automated code review of instrumentation/spring/spring-webmvc/spring-webmvc-3.1/javaagent.
Automated code review of instrumentation/spring/spring-webmvc/spring-webmvc-5.3/library.
Automated code review of instrumentation/spring/spring-webmvc/spring-webmvc-6.0/library.
Automated code review of instrumentation/spring/spring-ws-2.0/javaagent.
Automated code review of instrumentation/struts/struts-2.3/javaagent.
Automated code review of instrumentation/struts/struts-7.0/javaagent.
Automated code review of instrumentation/tomcat/tomcat-10.0/javaagent.
@otelbot otelbot Bot requested a review from a team as a code owner May 2, 2026 17:12
@trask trask merged commit 4a86720 into main May 2, 2026
95 checks passed
@trask trask deleted the otelbot/code-review-sweep-25256350389 branch May 2, 2026 20:42
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.

2 participants