Skip to content

Code review sweep (run 25140325973)#18427

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

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

Conversation

@otelbot

@otelbot otelbot Bot commented Apr 30, 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:

  • elasticsearch-transport-6.0:javaagent
  • elasticsearch-transport-6.0:testing
  • elasticsearch-transport-common:javaagent
  • elasticsearch-transport-common:testing
  • executors:bootstrap
  • executors:javaagent
  • executors:jdk21-testing
  • executors:testing
  • external-annotations:javaagent
  • external-annotations:javaagent-unit-tests
  • failsafe-3.0:library
  • finagle-http-23.11:javaagent
  • finatra-2.9:javaagent
  • geode-1.4:javaagent

Module: elasticsearch-transport-6.0:javaagent

Module path: instrumentation/elasticsearch/elasticsearch-transport-6.0/javaagent

Summary

No safe fixes were applied. The only deterministic issue found was not kept because applying it caused :instrumentation:elasticsearch:elasticsearch-transport-6.0:javaagent:check to fail.

Applied Changes

No safe automated changes were applied.

Unresolved Items

File: build.gradle.kts
Reason: `gradle-conventions.md` requires sibling version `:javaagent` modules to be listed via `testInstrumentation`; adding `elasticsearch-transport-5.0` and `elasticsearch-transport-5.3` caused runtime muzzle failures in `:check`, so this needs a broader sibling-module fix before the wiring can be safely added.

Module: elasticsearch-transport-6.0:testing

Module path: instrumentation/elasticsearch/elasticsearch-transport-6.0/testing

Summary

No safe repository-guideline fixes were applied in instrumentation/elasticsearch/elasticsearch-transport-6.0/testing; scoped files and required metadata.yaml config coverage were reviewed without finding deterministic in-scope changes.

Applied Changes

No safe automated changes were applied.

Module: elasticsearch-transport-common:javaagent

Module path: instrumentation/elasticsearch/elasticsearch-transport-common/javaagent

Summary

No safe repository-guideline fixes were applied after reviewing instrumentation/elasticsearch/elasticsearch-transport-common/javaagent; no substantive diffs remain.

Applied Changes

No safe automated changes were applied.

Module: elasticsearch-transport-common:testing

Module path: instrumentation/elasticsearch/elasticsearch-transport-common/testing

Summary

Applied one safe review fix and committed it as 1c66c03d (Review fixes for elasticsearch-transport-common testing).

Applied Changes

Testing

File: AbstractElasticsearchTransportClientTest.java:164
Change: Replaced non-exact `hasAttributesSatisfying(...)` on the exception event with `hasAttributesSatisfyingExactly(...)` and asserted the emitted `exception.message` and `exception.stacktrace` attributes.
Reason: `testing-general-patterns.md` requires `hasAttributesSatisfyingExactly(...)` for attribute assertions because non-exact assertions silently ignore unexpected attributes.

Module: executors:bootstrap

Module path: instrumentation/executors/bootstrap

Summary

No safe repository-guideline fixes were found in instrumentation/executors/bootstrap; no files were changed.

Applied Changes

No safe automated changes were applied.

Module: executors:javaagent

Module path: instrumentation/executors/javaagent

Summary

Applied and committed safe review fixes for instrumentation/executors/javaagent in commit af824a86.

Applied Changes

Style

File: JavaExecutorInstrumentation.java:337
Change: Annotated the nullable `@Advice.Argument(0)` collection in `submitEnter(...)` and removed the redundant `tasks != null ? tasks : emptyList()` guard after the null check.
Reason: Repository nullability guidance requires `@Nullable` where `null` can flow from callers, and defensive null guards on non-null parameters should be removed when the caller already establishes the non-null contract.

Testing

File: ThreadPoolExecutorTest.java:24
Change: Registered `AutoCleanupExtension` and deferred cleanup of `RunnableCheckingThreadPoolExecutor` with `shutdownNow`.
Reason: Testing resource-cleanup guidance prefers JUnit-managed `AutoCleanupExtension` cleanup for `AutoCloseable`-like resources that remain live until test end.

Module: executors:jdk21-testing

Module path: instrumentation/executors/jdk21-testing

Summary

Applied 1 safe repository-guideline fix under instrumentation/executors/jdk21-testing and committed it as 77f1d77a.

Applied Changes

Style

File: build.gradle.kts:19
Change: Formatted the `minJavaVersionSupported.set(...)` calculation into the repository Kotlin multiline style, including the multiline `max(...)` call.
Reason: Repository style requires files to conform to `spotlessApply`/Google-style formatting; this keeps `build.gradle.kts` aligned with the Gradle/Kotlin formatting convention.

Module: executors:testing

Module path: instrumentation/executors/testing

Summary

No safe repository-guideline fixes were needed after reviewing instrumentation/executors/testing and the required instrumentation/executors/metadata.yaml config coverage.

Applied Changes

No safe automated changes were applied.

Module: external-annotations:javaagent

Module path: instrumentation/external-annotations/javaagent

Summary

No safe repository-guideline fixes were found under instrumentation/external-annotations/javaagent. The module metadata.yaml configuration entries for include and exclude-methods match the javaagent config reads and declarative config resource shape.

Applied Changes

No safe automated changes were applied.

Module: external-annotations:javaagent-unit-tests

Module path: instrumentation/external-annotations/javaagent-unit-tests

Summary

No safe repository-guideline fixes were found in instrumentation/external-annotations/javaagent-unit-tests.

Applied Changes

No safe automated changes were applied.

Module: failsafe-3.0:library

Module path: instrumentation/failsafe-3.0/library

Summary

Applied and committed one safe repository-guideline fix under instrumentation/failsafe-3.0/library.

Applied Changes

Style

File: FailsafeTelemetryTest.java:49
Change: Renamed the unused `CircuitBreakerOpenException` catch parameter from `e` to `ignored`.
Reason: `knowledge/general-rules.md` catch-variable guidance says intentionally unused catch parameters should be named `ignored`.

Module: finagle-http-23.11:javaagent

Module path: instrumentation/finagle-http-23.11/javaagent

Summary

Applied one safe review fix and committed it as 94ac6af2. Kept assertInverse.set(true) out of the final change because direct :instrumentation:finagle-http-23.11:javaagent:muzzle validation showed the instrumentation unexpectedly passes pre-23.11.0 Finagle versions.

Applied Changes

Build

File: build.gradle.kts:44
Change: Moved duplicated experimental HTTP telemetry `jvmArgs(...)` from `test` and `testStableSemconv` into `withType<Test>().configureEach`.
Reason: `gradle-conventions.md` says shared JVM args should be configured once with `withType<Test>().configureEach` when a module has explicit custom `Test` tasks.

Unresolved Items

File: build.gradle.kts
Reason: `assertInverse.set(true)` would normally be expected for bounded muzzle pass ranges, but adding it made `:instrumentation:finagle-http-23.11:javaagent:muzzle` fail because multiple pre-`23.11.0` Finagle versions unexpectedly passed validation; a manual version-boundary decision is needed before adding inverse assertions.

Module: finatra-2.9:javaagent

Module path: instrumentation/finatra-2.9/javaagent

Summary

Applied and committed safe repository-guideline fixes for instrumentation/finatra-2.9/javaagent; validation completed with :instrumentation:finatra-2.9:javaagent:check, :instrumentation:finatra-2.9:javaagent:check -PtestLatestDeps=true, and final spotlessApply.

Applied Changes

Style

File: build.gradle.kts:56
Change: Corrected the `finatraLatest` comment spelling from `configuation` to `configuration`.
Reason: Repository general review rules flag incorrect comments; fixing the typo keeps build comments accurate without behavior changes.

File: FinatraSingletons.java:27
Change: Moved `callbackClassField` alongside the other static fields before the static initializer.
Reason: The style guide class organization rule places static fields before static initializers and methods.

Nullability

File: FinatraRouteInstrumentation.java:99
Change: Added `@Nullable` to advice enter method `nameSpan()` because it delegates to `AdviceScope.start()` which can return `null`.
Reason: Repository nullability guidance requires annotating return types when a method can actually return `null`; `@Advice.Enter` is already consumed as nullable on method exit.

Module: geode-1.4:javaagent

Module path: instrumentation/geode-1.4/javaagent

Summary

Applied and committed one safe cleanup fix for geode-1.4 javaagent; one muzzle inverse item remains unresolved because validation showed it is not safe as a deterministic review fix.

Applied Changes

Testing

File: PutGetTest.java:51
Change: Added `@AfterAll closeCache()` to close the class-scoped `ClientCache`.
Reason: Repository test resource cleanup guidance requires class-scoped resources to be closed; with a single cleanup action, a plain `@AfterAll` is preferred over introducing `AutoCleanupExtension`.

Unresolved Items

File: build.gradle.kts
Reason: `gradle-conventions.md` normally requires `assertInverse.set(true)` for bounded `muzzle` ranges, but adding it made `:instrumentation:geode-1.4:javaagent:muzzle` fail because Geode `1.0.0-incubating` through `1.3.0` unexpectedly pass muzzle. This needs a version-boundary decision, such as a validated `classLoaderMatcher()` landmark or a corrected supported range.


Download code review diagnostics

otelbot Bot added 7 commits April 30, 2026 01:02
Automated code review of instrumentation/elasticsearch/elasticsearch-transport-common/testing.
Automated code review of instrumentation/executors/javaagent.
Automated code review of instrumentation/executors/jdk21-testing.
Automated code review of instrumentation/failsafe-3.0/library.
Automated code review of instrumentation/finagle-http-23.11/javaagent.
Automated code review of instrumentation/finatra-2.9/javaagent.
Automated code review of instrumentation/geode-1.4/javaagent.
@otelbot otelbot Bot requested a review from a team as a code owner April 30, 2026 01:30
@trask trask enabled auto-merge (squash) April 30, 2026 02:25
@trask trask closed this Apr 30, 2026
auto-merge was automatically disabled April 30, 2026 02:25

Pull request was closed

@trask trask reopened this Apr 30, 2026
@trask trask enabled auto-merge (squash) April 30, 2026 02:26
@trask trask merged commit 942bcdd into main Apr 30, 2026
103 of 188 checks passed
@trask trask deleted the otelbot/code-review-sweep-25140325973 branch April 30, 2026 03:06
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