Skip to content

Code review sweep (run 25243457683)#18504

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

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

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:

  • servlet-common-javax:library
  • servlet-common:bootstrap
  • servlet-common:javaagent
  • servlet-common:library
  • spark-2.3:javaagent
  • spring-batch-3.0:javaagent
  • spring-boot-actuator-autoconfigure-2.0:javaagent
  • spring:spring-boot-autoconfigure
  • spring-boot-autoconfigure:testing

Module: servlet-common-javax:library

Module path: instrumentation/servlet/servlet-common-javax/library

Summary

No safe repository-guideline fixes were found in instrumentation/servlet/servlet-common-javax/library; no files were changed.

Applied Changes

No safe automated changes were applied.

Module: servlet-common:bootstrap

Module path: instrumentation/servlet/servlet-common/bootstrap

Summary

Applied 1 safe repository-guideline fix under instrumentation/servlet/servlet-common/bootstrap and committed it.

Applied Changes

Style

File: ServletContextPath.java:30
Change: Moved the `contextPath` instance field and private `ServletContextPath(...)` constructor above static methods, keeping construction-related members together.
Reason: Repository style guide class organization prefers static fields, then instance fields, constructors, and methods; static factory methods should sit next to constructors in the construction section.

Module: servlet-common:javaagent

Module path: instrumentation/servlet/servlet-common/javaagent

Summary

Applied safe visibility fixes in servlet-common javaagent helpers and committed them as 8b3131ad.

Applied Changes

Style

File: AsyncRequestCompletionListener.java:15
Change: Reduced `AsyncRequestCompletionListener` and its constructor from `public` to package-private.
Reason: The repository style guide requires minimal necessary visibility; sibling-module caller search showed this helper is only instantiated from `ServletHelper` in the same package.

File: AsyncRunnableWrapper.java:11
Change: Reduced `AsyncRunnableWrapper` and its `wrap(...)` factory from `public` to package-private.
Reason: The repository style guide requires minimal necessary visibility; sibling-module caller search showed this wrapper is only used by `ServletHelper` in the same package.

Module: servlet-common:library

Module path: instrumentation/servlet/servlet-common/library

Summary

Applied one safe repository-guideline fix in instrumentation/servlet/servlet-common/library and committed it as ed81f713.

Applied Changes

General

File: ServletRequestParametersExtractor.java:70
Change: Renamed the `parameterAttributeKey` argument from `headerName` to `parameterName`.
Reason: Fixes a copy/paste naming mismatch under the general review rule for correctness and misleading identifiers; this helper handles servlet request parameters, not headers.

Module: spark-2.3:javaagent

Module path: instrumentation/spark-2.3/javaagent

Summary

No safe repository-guideline fixes were found for instrumentation/spark-2.3/javaagent; no files were changed.

Applied Changes

No safe automated changes were applied.

Module: spring-batch-3.0:javaagent

Module path: instrumentation/spring/spring-batch-3.0/javaagent

Summary

Applied one safe repository-guideline fix in spring-batch-3.0 javaagent and committed it as 1fa72804.

Applied Changes

General

File: TracingChunkExecutionListener.java:40
Change: Corrected copy/paste comments to reference `beforeChunk`/`afterChunk` and `TracingChunkExecutionListener` instead of job listener names.
Reason: `knowledge/general-rules.md` requires fixing incorrect comments and copy/paste mistakes when deterministic and safe.

Module: spring-boot-actuator-autoconfigure-2.0:javaagent

Module path: instrumentation/spring/spring-boot-actuator-autoconfigure-2.0/javaagent

Summary

Applied one safe repository-guideline fix in spring-boot-actuator-autoconfigure-2.0 javaagent and committed it.

Applied Changes

Build

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

Module: spring:spring-boot-autoconfigure

Module path: instrumentation/spring/spring-boot-autoconfigure

Summary

Applied 1 safe repository-guideline fix and committed it in 07c388e8.

Applied Changes

Config

File: metadata.yaml:8
Change: Added a `configurations` entry for `otel.instrumentation.kafka.autoconfigure-interceptor` with `declarative_name` `java.kafka.autoconfigure_interceptor`, type `boolean`, and default `true`.
Reason: `metadata-yaml-format.md` requires instrumentation module metadata to cover config properties read by source code; `KafkaInstrumentationAutoConfiguration` reads this property via `@ConditionalOnProperty`.

Module: spring-boot-autoconfigure:testing

Module path: instrumentation/spring/spring-boot-autoconfigure/testing

Summary

Applied safe style-guide visibility fixes in spring-boot-autoconfigure testing and committed them.

Applied Changes

Style

File: AbstractKafkaInstrumentationAutoConfigurationTest.java:22
Change: Changed unused `contextRunner` field visibility from `protected` to `private`.
Reason: Repository style guide requires the minimal necessary visibility; subclasses do not access this `contextRunner` field.

File: AbstractMicrometerBridgeAutoConfigurationTest.java:26
Change: Changed unused `contextRunner` field visibility from `protected` to `private`.
Reason: Repository style guide requires the minimal necessary visibility; subclasses do not access this `contextRunner` field.

File: AbstractR2DbcInstrumentationAutoConfigurationTest.java:24
Change: Changed unused `contextRunner` field visibility from `protected` to `private`.
Reason: Repository style guide requires the minimal necessary visibility; subclasses do not access this `contextRunner` field.

File: AbstractRestClientInstrumentationAutoConfigurationTest.java:26
Change: Changed unused `contextRunner` field visibility from `protected` to `private`.
Reason: Repository style guide requires the minimal necessary visibility; subclasses do not access this `contextRunner` field.

File: AbstractSpringWebInstrumentationAutoConfigurationTest.java:21
Change: Changed unused `contextRunner` field visibility from `protected` to `private`.
Reason: Repository style guide requires the minimal necessary visibility; subclasses do not access this `contextRunner` field.


Download code review diagnostics

otelbot Bot added 7 commits May 2, 2026 04:40
Automated code review of instrumentation/servlet/servlet-common/bootstrap.
Automated code review of instrumentation/servlet/servlet-common/javaagent.
Automated code review of instrumentation/servlet/servlet-common/library.
Automated code review of instrumentation/spring/spring-batch-3.0/javaagent.
Automated code review of instrumentation/spring/spring-boot-actuator-autoconfigure-2.0/javaagent.
Automated code review of instrumentation/spring/spring-boot-autoconfigure.
Automated code review of instrumentation/spring/spring-boot-autoconfigure/testing.
@otelbot otelbot Bot requested a review from a team as a code owner May 2, 2026 05:14
@trask trask merged commit fb14c6f into main May 2, 2026
97 checks passed
@trask trask deleted the otelbot/code-review-sweep-25243457683 branch May 2, 2026 15:44
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