Skip to content

Code review sweep (run 25256858815)#18516

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

Code review sweep (run 25256858815)#18516
trask merged 8 commits into
mainfrom
otelbot/code-review-sweep-25256858815

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:

  • tomcat-7.0:javaagent
  • tomcat-common:javaagent
  • tomcat-jdbc:javaagent
  • twilio-6.6:javaagent
  • undertow-1.4:bootstrap
  • undertow-1.4:javaagent
  • vaadin-14.2:javaagent
  • vaadin-14.2:testing
  • vertx-http-client-3.0:javaagent
  • vertx-http-client-4.0:javaagent
  • vertx-http-client-5.0:javaagent

Module: tomcat-7.0:javaagent

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

Summary

Applied 2 safe repository-guideline fixes under instrumentation/tomcat/tomcat-7.0/javaagent and committed them in 2aa5c77e.

Applied Changes

Build

File: build.gradle.kts:37
Change: Changed the test configuration block from `withType<Test>().configureEach` to `test`.
Reason: `gradle-conventions.md` says modules with only one explicit `Test` task should use `tasks.test`; `withType<Test>().configureEach` is reserved for modules that explicitly register additional `Test` tasks.

Javaagent

File: Tomcat7InstrumentationModule.java:54
Change: Removed `onThrowable = Throwable.class` from the return-only `@Advice.OnMethodExit` advice `attachResponse`.
Reason: `javaagent-advice-patterns.md` says return-only exit advice that only processes `@Advice.Return` and has no cleanup should omit `onThrowable` while keeping `suppress = Throwable.class`.

Module: tomcat-common:javaagent

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

Summary

No safe repository-guideline fixes were needed under instrumentation/tomcat/tomcat-common/javaagent; the scoped source and build.gradle.kts already match the applicable review rules checked.

Applied Changes

No safe automated changes were applied.

Module: tomcat-jdbc:javaagent

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

Summary

Applied 1 safe metadata fix for tomcat-jdbc and committed it. Left the existing assertInverse.set(true) exception unresolved because adding it made :instrumentation:tomcat:tomcat-jdbc:javaagent:muzzle fail on older tomcat-jdbc versions that still pass muzzle.

Applied Changes

Config

File: metadata.yaml:8
Change: Added `declarative_name: general.semconv_stability.opt_in` for `otel.semconv-stability.opt-in`.
Reason: `metadata-yaml-format.md` requires every config entry to include the declarative YAML path, and `otel.semconv-stability.opt-in` maps to `general.semconv_stability.opt_in`.

Unresolved Items

File: build.gradle.kts
Reason: Gradle conventions normally require `assertInverse.set(true)` for bounded muzzle ranges, but adding it caused `:instrumentation:tomcat:tomcat-jdbc:javaagent:muzzle` to fail because older `tomcat-jdbc` `7.0`/`8.0` artifacts unexpectedly pass muzzle. A manual version-boundary decision is needed before changing this exception.

Module: twilio-6.6:javaagent

Module path: instrumentation/twilio-6.6/javaagent

Summary

Applied one safe twilio-6.6 javaagent review fix and committed it in de462a3e.

Applied Changes

Javaagent

File: TwilioAsyncInstrumentation.java:82
Change: Removed the static import of computed helper `TwilioSingletons.spanName(...)` and qualified the call at the usage site.
Reason: `javaagent-singletons-patterns.md` says `*Singletons` static imports should be limited to stored singleton accessors or constant-like fields; helper methods that perform work should remain qualified.

Module: undertow-1.4:bootstrap

Module path: instrumentation/undertow-1.4/bootstrap

Summary

Applied one safe repository-guideline fix in instrumentation/undertow-1.4/bootstrap and committed it as 514fd860.

Applied Changes

Nullability

File: KeyHolder.java:37
Change: Added `@Nullable` to `KeyHolder.get(...)` because the backing `ConcurrentMap.get(...)` can return `null`.
Reason: Repository nullability guidance requires annotating return types when a method actually returns `null`; the concrete absent-key path returns `null` and the Undertow caller already handles it.

Module: undertow-1.4:javaagent

Module path: instrumentation/undertow-1.4/javaagent

Summary

Applied one safe repository-guideline fix in undertow-1.4 javaagent and committed it as 40d87582.

Applied Changes

Style

File: EndSpanListener.java:14
Change: Reduced `EndSpanListener` and its constructor from `public` to package-private.
Reason: The style guide requires minimal necessary visibility; this internal helper is not directly referenced from ByteBuddy advice methods and does not need `public` visibility.

Module: vaadin-14.2:javaagent

Module path: instrumentation/vaadin-14.2/javaagent

Summary

Reviewed instrumentation/vaadin-14.2/javaagent; no safe fixes were applied, and the working tree is unchanged.

Applied Changes

No safe automated changes were applied.

Unresolved Items

File: build.gradle.kts
Reason: `muzzle` `pass` ranges are missing `assertInverse.set(true)` per Gradle conventions, but adding it conflicts with existing explicit `fail` ranges for the same `com.vaadin:flow-server` artifact and causes duplicate generated `muzzle-AssertFail` configurations; this needs a manual build-convention decision.

Module: vaadin-14.2:testing

Module path: instrumentation/vaadin-14.2/testing

Summary

No safe repository-guideline fixes were found in instrumentation/vaadin-14.2/testing. The module metadata.yaml entry for otel.instrumentation.common.experimental.controller-telemetry.enabled matches the documented declarative config format and the consuming javaagent test module already applies the required Testcontainers build service.

Applied Changes

No safe automated changes were applied.

Module: vertx-http-client-3.0:javaagent

Module path: instrumentation/vertx/vertx-http-client/vertx-http-client-3.0/javaagent

Summary

Applied and committed one safe review fix for vertx-http-client-3.0 javaagent.

Applied Changes

Javaagent

File: Vertx3HttpAttributesGetter.java:8
Change: Reused `VertxClientSingletons.REQUEST_INFO` instead of declaring a duplicate `VirtualField` in `Vertx3HttpAttributesGetter`.
Reason: `javaagent-singletons-patterns.md` says exported uppercase constant-like fields such as `VirtualField` handles should be static-imported and used unqualified by callers.

Module: vertx-http-client-4.0:javaagent

Module path: instrumentation/vertx/vertx-http-client/vertx-http-client-4.0/javaagent

Summary

Applied 1 safe repository-guideline style fix in vertx-http-client-4.0 javaagent and committed it.

Applied Changes

Style

File: HandlerWrapper.java:33
Change: Renamed the unused try-with-resources `Scope` variable from `ignore` to `ignored`.
Reason: Aligns with repository style guidance for intentionally unused identifiers and the established `Scope ignored = ...` pattern used by similar wrappers.

Module: vertx-http-client-5.0:javaagent

Module path: instrumentation/vertx/vertx-http-client/vertx-http-client-5.0/javaagent

Summary

Applied and committed safe review fixes for vertx-http-client-5.0 javaagent: simplified redundant ByteBuddy method matchers and added @AfterAll cleanup for the Vert.x test instance.

Applied Changes

Javaagent

File: HttpRequestInstrumentation.java:62
Change: Removed redundant `isMethod()` from `transform()` method matchers that already match non-empty method names.
Reason: Repository review guideline says redundant `isMethod()` should be removed when a method matcher already names a specific non-empty method.

Testing

File: VertxHttpClientTest.java:38
Change: Kept the created `Vertx` instance in a field and closed it in `@AfterAll` after the inherited `AbstractHttpClientTest` `PER_CLASS` suite finishes.
Reason: Testing cleanup guidance requires long-lived test resources to be cleaned up at test end; `@AfterAll` is appropriate here because the resource is shared for the class lifecycle.


Download code review diagnostics

otelbot Bot added 8 commits May 2, 2026 17:19
Automated code review of instrumentation/tomcat/tomcat-7.0/javaagent.
Automated code review of instrumentation/tomcat/tomcat-jdbc/javaagent.
Automated code review of instrumentation/twilio-6.6/javaagent.
Automated code review of instrumentation/undertow-1.4/bootstrap.
Automated code review of instrumentation/undertow-1.4/javaagent.
Automated code review of instrumentation/vertx/vertx-http-client/vertx-http-client-3.0/javaagent.
Automated code review of instrumentation/vertx/vertx-http-client/vertx-http-client-4.0/javaagent.
Automated code review of instrumentation/vertx/vertx-http-client/vertx-http-client-5.0/javaagent.
@otelbot otelbot Bot requested a review from a team as a code owner May 2, 2026 18:02
@trask trask merged commit a27236f into main May 2, 2026
98 checks passed
@trask trask deleted the otelbot/code-review-sweep-25256858815 branch May 2, 2026 21:41
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