Skip to content

Code review sweep (run 25152152525)#18440

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

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

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:

  • internal-eclipse-osgi-3.6:javaagent
  • internal-lambda:javaagent
  • internal-reflection:javaagent
  • internal-reflection:javaagent-integration-tests
  • internal-url-class-loader:javaagent
  • internal-url-class-loader:javaagent-integration-tests
  • java-http-client:javaagent
  • java-http-client:library
  • java-http-client:testing
  • java-http-server:javaagent
  • java-http-server:library
  • java-http-server:testing
  • java-util-logging:javaagent
  • java-util-logging:shaded-stub-for-instrumenting
  • javalin-5.0:javaagent
  • javalin-7.0:javaagent
  • javalin:testing
  • jaxrs-client:jaxrs-client-1.1-testing
  • jaxrs-client:jaxrs-client-2.0-testing

Module: internal-eclipse-osgi-3.6:javaagent

Module path: instrumentation/internal/internal-eclipse-osgi-3.6/javaagent

Summary

No safe repository-guideline fixes were found under instrumentation/internal/internal-eclipse-osgi-3.6/javaagent; no files changed.

Applied Changes

No safe automated changes were applied.

Module: internal-lambda:javaagent

Module path: instrumentation/internal/internal-lambda/javaagent

Summary

Applied and committed one safe repository-guideline fix for internal-lambda javaagent.

Applied Changes

Build

File: build.gradle.kts:6
Change: Removed the explicit production `compileOnly(project(":javaagent-bootstrap"))` dependency.
Reason: `gradle-conventions.md` says javaagent modules must not declare `javaagent-bootstrap` explicitly because `otel.javaagent-instrumentation` already provides it on the compile-only classpath.

Module: internal-reflection:javaagent

Module path: instrumentation/internal/internal-reflection/javaagent

Summary

No safe repository-guideline fixes were needed for instrumentation/internal/internal-reflection/javaagent; the scoped files and parent metadata.yaml did not reveal deterministic issues to change.

Applied Changes

No safe automated changes were applied.

Module: internal-reflection:javaagent-integration-tests

Module path: instrumentation/internal/internal-reflection/javaagent-integration-tests

Summary

Applied safe style fixes in 2 files under instrumentation/internal/internal-reflection/javaagent-integration-tests: made TestClass package-private and aligned the generated serialVersionUID assertion.

Applied Changes

Style

File: TestClass.java:10
Change: Changed `TestClass` from `public` to package-private.
Reason: Repository style guide requires minimal necessary visibility, and test classes/helpers should generally be package-protected when no wider visibility is needed.

Testing

File: ReflectionTest.java:45
Change: Updated the expected generated `serialVersionUID` for `TestClass`.
Reason: Changing class visibility changes the default generated `serialVersionUID`; the test assertion must stay aligned with the class signature after the visibility fix.

Module: internal-url-class-loader:javaagent

Module path: instrumentation/internal/internal-url-class-loader/javaagent

Summary

No safe repository-guideline fixes were applied under instrumentation/internal/internal-url-class-loader/javaagent; the reviewed build.gradle.kts, UrlClassLoaderInstrumentation, and UrlClassLoaderInstrumentationModule already match the applicable internal javaagent, advice, metadata, and Gradle conventions.

Applied Changes

No safe automated changes were applied.

Module: internal-url-class-loader:javaagent-integration-tests

Module path: instrumentation/internal/internal-url-class-loader/javaagent-integration-tests

Summary

No safe repository-guideline fixes were applied under instrumentation/internal/internal-url-class-loader/javaagent-integration-tests. The reviewed files already conform to the applicable style, javaagent, Gradle, testing, and metadata.yaml guidance for this scope.

Applied Changes

No safe automated changes were applied.

Module: java-http-client:javaagent

Module path: instrumentation/java-http-client/javaagent

Summary

Applied one safe repository-guideline fix and committed it in 5b086723: added the missing declarative config key in metadata.yaml.

Applied Changes

Config

File: metadata.yaml:26
Change: Added `declarative_name: java.common.peer_service_mapping` for `otel.instrumentation.common.peer-service-mapping`.
Reason: `metadata-yaml-format.md` requires configuration entries to include the matching declarative name; the standard `otel.instrumentation.*` conversion maps this property to `java.common.peer_service_mapping`, consistent with comparable instrumentation metadata.

Module: java-http-client:library

Module path: instrumentation/java-http-client/library

Summary

Applied one safe repository-guideline fix in instrumentation/java-http-client/library and committed it.

Applied Changes

Nullability

File: ResponseConsumer.java:34
Change: Annotated `ResponseConsumer.accept(...)` parameters with `@Nullable`.
Reason: `CompletableFuture.whenComplete` can call `BiConsumer.accept(...)` with a `null` response or `null` throwable, and repository nullability rules require annotating parameters that can receive `null`; `Instrumenter.end(...)` already accepts nullable response and error arguments.

Module: java-http-client:testing

Module path: instrumentation/java-http-client/testing

Summary

Applied one safe testing-guideline fix under instrumentation/java-http-client/testing and committed it as 3c350c63.

Applied Changes

Testing

File: AbstractJavaHttpClientTest.java:177
Change: Replaced the `cancelRequest()` client-span assertion with `hasAttributesSatisfyingExactly(...)` and added the conditional `maybeStablePeerService()` expectation for javaagent spans.
Reason: Repository testing guidance prefers `hasAttributesSatisfyingExactly(...)` because non-exact attribute assertions silently ignore unexpected attributes; mode-dependent assertions should use shared semconv helpers and `null` for absent attributes.

Module: java-http-server:javaagent

Module path: instrumentation/java-http-server/javaagent

Summary

No safe repository-guideline fixes were applied after reviewing instrumentation/java-http-server/javaagent and the required parent metadata.yaml.

Applied Changes

No safe automated changes were applied.

Module: java-http-server:library

Module path: instrumentation/java-http-server/library

Summary

Applied one safe repository-guideline fix and committed it in a1d46d1c.

Applied Changes

Config

File: metadata.yaml:26
Change: Added `declarative_name: java.common.peer_service_mapping` for `otel.instrumentation.common.peer-service-mapping`.
Reason: `metadata-yaml-format.md` requires each metadata configuration entry to include a matching `declarative_name`; peer-service mapping entries use `java.common.peer_service_mapping` elsewhere in the repository.

Module: java-http-server:testing

Module path: instrumentation/java-http-server/testing

Summary

No safe fixes were applied to files under instrumentation/java-http-server/testing; the reviewed target files already matched the applicable repository review guidelines. Mandatory module metadata validation found one parent metadata.yaml issue outside the requested directory scope.

Applied Changes

No safe automated changes were applied.

Unresolved Items

File: metadata.yaml
Reason: `declarative_name` for `otel.instrumentation.common.peer-service-mapping` is `java.common.peer_service_mapping`, but the bridge and runtime resolver use `java.common.service_peer_mapping`; this parent metadata file is outside the requested `instrumentation/java-http-server/testing` review path.

Module: java-util-logging:javaagent

Module path: instrumentation/java-util-logging/javaagent

Summary

Applied safe repository-guideline fixes under instrumentation/java-util-logging/javaagent and committed them in 5f8efd5a.

Applied Changes

Build

File: build.gradle.kts:5
Change: Removed the explicit `compileOnly(project(":javaagent-bootstrap"))` dependency.
Reason: `gradle-conventions.md` says javaagent modules must not declare `javaagent-bootstrap` explicitly because `otel.javaagent-instrumentation` already provides it on the compile classpath.

Testing

File: JavaUtilLoggingTest.java:35
Change: Renamed the experimental flag field from `isExperimentalAttributesEnabled` to `EXPERIMENTAL_ATTRIBUTES` and updated its usages.
Reason: `testing-experimental-flags.md` says module experimental flags should be hoisted into a per-class `private static final boolean EXPERIMENTAL_ATTRIBUTES` constant.

Module: java-util-logging:shaded-stub-for-instrumenting

Module path: instrumentation/java-util-logging/shaded-stub-for-instrumenting

Summary

No safe fixes were applied. All target files are under instrumentation/java-util-logging/shaded-stub-for-instrumenting, and the review guideline requires skipping shaded-stub-for-instrumenting/ modules because they are minimal stand-ins for external library classes.

Applied Changes

No safe automated changes were applied.

Module: javalin-5.0:javaagent

Module path: instrumentation/javalin/javalin-5.0/javaagent

Summary

No safe repository-guideline fixes were needed for instrumentation/javalin/javalin-5.0/javaagent; the scoped files and metadata.yaml already conform to the loaded review rules.

Applied Changes

No safe automated changes were applied.

Module: javalin-7.0:javaagent

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

Summary

No safe repository-guideline fixes were needed under instrumentation/javalin/javalin-7.0/javaagent; metadata.yaml has no config entries requiring declarative validation changes.

Applied Changes

No safe automated changes were applied.

Module: javalin:testing

Module path: instrumentation/javalin/testing

Summary

No safe repository-guideline fixes were needed under instrumentation/javalin/testing; the scoped files already matched the applicable style, testing, Gradle, and metadata review guidance.

Applied Changes

No safe automated changes were applied.

Module: jaxrs-client:jaxrs-client-1.1-testing

Module path: instrumentation/jaxrs-client/jaxrs-client-1.1-testing

Summary

No safe repository-guideline fixes were found in instrumentation/jaxrs-client/jaxrs-client-1.1-testing; no files were changed.

Applied Changes

No safe automated changes were applied.

Module: jaxrs-client:jaxrs-client-2.0-testing

Module path: instrumentation/jaxrs-client/jaxrs-client-2.0-testing

Summary

Applied safe style-guideline fixes in jaxrs-client-2.0-testing and committed them as 488958ad.

Applied Changes

Style

File: ResteasyProxyClientTest.java:62
Change: Updated `ResteasyProxyResource` call sites from snake_case method names like `get_success()` to lower camel case names like `getSuccess()`.
Reason: The repository style guide follows Google Java Style, which uses lower camel case for Java method names; updating call sites keeps the rename compile-ready.

File: ResteasyProxyResource.java:20
Change: Renamed RESTEasy proxy interface methods from snake_case (`get_error()`, `post_success()`, etc.) to lower camel case (`getError()`, `postSuccess()`, etc.).
Reason: The repository style guide follows Google Java Style, which uses lower camel case for Java method names.


Download code review diagnostics

otelbot Bot added 8 commits April 30, 2026 07:18
Automated code review of instrumentation/internal/internal-lambda/javaagent.
Automated code review of instrumentation/internal/internal-reflection/javaagent-integration-tests.
Automated code review of instrumentation/java-http-client/javaagent.
Automated code review of instrumentation/java-http-client/library.
Automated code review of instrumentation/java-http-client/testing.
Automated code review of instrumentation/java-http-server/library.
Automated code review of instrumentation/java-util-logging/javaagent.
Automated code review of instrumentation/jaxrs-client/jaxrs-client-2.0-testing.
@otelbot otelbot Bot requested a review from a team as a code owner April 30, 2026 08:17
@trask trask closed this Apr 30, 2026
@trask trask reopened this Apr 30, 2026
@trask trask merged commit de3d249 into main Apr 30, 2026
95 checks passed
@trask trask deleted the otelbot/code-review-sweep-25152152525 branch April 30, 2026 19:33
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