Skip to content

Code review sweep (run 25137477817)#18422

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

Code review sweep (run 25137477817)#18422
trask merged 14 commits into
mainfrom
otelbot/code-review-sweep-25137477817

Conversation

@otelbot

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

  • couchbase-3.1:tracing-opentelemetry-shaded
  • couchbase-3.2:javaagent
  • couchbase-3.2:tracing-opentelemetry-shaded
  • couchbase-3.4:javaagent
  • couchbase-3.4:tracing-opentelemetry-shaded
  • couchbase-common-2.0:javaagent
  • couchbase-common-2.0:javaagent-unit-tests
  • couchbase-common:testing
  • dropwizard-metrics-4.0:javaagent
  • dropwizard:dropwizard-testing
  • dropwizard-views-0.7:javaagent
  • elasticsearch-api-client-7.16:javaagent
  • elasticsearch-api-client-7.16:javaagent-unit-tests

Module: couchbase-3.1:tracing-opentelemetry-shaded

Module path: instrumentation/couchbase/couchbase-3.1/tracing-opentelemetry-shaded

Summary

No safe repository-guideline fixes were applied. Reviewed build.gradle.kts under the requested directory and validated the owning metadata.yaml format requirements; no deterministic issues were found.

Applied Changes

No safe automated changes were applied.

Module: couchbase-3.2:javaagent

Module path: instrumentation/couchbase/couchbase-3.2/javaagent

Summary

Applied 1 safe repository-guideline fix under instrumentation/couchbase/couchbase-3.2/javaagent and committed it as 12aeeca4.

Applied Changes

Javaagent

File: CouchbaseInstrumentationModule.java:31
Change: Changed the negated `hasClassesNamed()` landmark comment for `CoreTransactionRequest` from `removed in 3.4.0` to `added in 3.4.0` and placed it directly above the class string.
Reason: `classLoaderMatcher()` guidance requires negated exclusion landmarks inside `not(hasClassesNamed(...))` to document when the excluded class was `added`, and chained landmark comments must sit directly above the relevant class name string.

Module: couchbase-3.2:tracing-opentelemetry-shaded

Module path: instrumentation/couchbase/couchbase-3.2/tracing-opentelemetry-shaded

Summary

No safe repository-guideline fixes were applied. Reviewed tracked file instrumentation/couchbase/couchbase-3.2/tracing-opentelemetry-shaded/build.gradle.kts; generated build/ artifacts were not modified, and metadata.yaml required no config-format changes.

Applied Changes

No safe automated changes were applied.

Module: couchbase-3.4:javaagent

Module path: instrumentation/couchbase/couchbase-3.4/javaagent

Summary

No safe repository-guideline fixes were applied under instrumentation/couchbase/couchbase-3.4/javaagent; the reviewed files already conform to the applicable metadata, javaagent, Gradle, and test guidance.

Applied Changes

No safe automated changes were applied.

Module: couchbase-3.4:tracing-opentelemetry-shaded

Module path: instrumentation/couchbase/couchbase-3.4/tracing-opentelemetry-shaded

Summary

No safe repository-guideline fixes were applied. Reviewed the tracked tracing-opentelemetry-shaded/build.gradle.kts file and mandatory couchbase-3.4/metadata.yaml; no deterministic issue was found.

Applied Changes

No safe automated changes were applied.

Module: couchbase-common-2.0:javaagent

Module path: instrumentation/couchbase/couchbase-common-2.0/javaagent

Summary

Applied one safe repository-guideline fix in couchbase-common-2.0 javaagent and committed it as 7a18f760.

Applied Changes

Style

File: CouchbaseQuerySanitizer.java:36
Change: Renamed unused catch parameters from `e` to `ignored` in optional Couchbase class-probe catch blocks.
Reason: `knowledge/general-rules.md` catch-variable guidance says intentionally unused catch parameters should be named `ignored`.

Module: couchbase-common-2.0:javaagent-unit-tests

Module path: instrumentation/couchbase/couchbase-common-2.0/javaagent-unit-tests

Summary

No safe repository-guideline fixes were found in instrumentation/couchbase/couchbase-common-2.0/javaagent-unit-tests; no files were changed.

Applied Changes

No safe automated changes were applied.

Module: couchbase-common:testing

Module path: instrumentation/couchbase/couchbase-common/testing

Summary

Applied 1 safe repository-guideline fix in couchbase-common testing and committed it as 7c8907d5.

Applied Changes

Testing

File: AbstractCouchbaseTest.java:32
Change: Hoisted `otel.instrumentation.couchbase.experimental-span-attributes` into a shared `EXPERIMENTAL_ATTRIBUTES` constant and reused it from `includesExperimentalAttributes()`.
Reason: `testing-experimental-flags.md` requires experimental test flags to be read once through a per-class `EXPERIMENTAL_ATTRIBUTES` constant instead of duplicating inline `Boolean.getBoolean(...)` reads.

Unresolved Items

File: AbstractCouchbaseAsyncClientTest.java
Reason: The multi-exception `Future.get(timeout, unit)` test throws clauses were not changed because widening them to `throws Exception` failed `./gradlew :instrumentation:couchbase:couchbase-common:testing:check` with Error Prone `InterruptedExceptionSwallowed`; no compile-safe single checked exception type preserves the `InterruptedException` contract.

Module: dropwizard-metrics-4.0:javaagent

Module path: instrumentation/dropwizard/dropwizard-metrics-4.0/javaagent

Summary

Applied one safe review fix and committed it in 3bac4d68; the affected :instrumentation:dropwizard:dropwizard-metrics-4.0:javaagent checks and final spotlessApply completed.

Applied Changes

Build

File: build.gradle.kts:18
Change: Replaced `tasks.withType<Test>().configureEach` with `tasks.test` for the single test task JVM argument.
Reason: `gradle-conventions.md` says single-test-task modules should use the simple `tasks.test` form; `withType<Test>().configureEach` is only justified when the module explicitly registers additional `Test` tasks.

Module: dropwizard:dropwizard-testing

Module path: instrumentation/dropwizard/dropwizard-testing

Summary

Applied one safe Gradle convention fix in dropwizard-testing; one experimental-task wiring concern remains manual-only.

Applied Changes

Build

File: build.gradle.kts:31
Change: Changed `tasks.withType<Test>().configureEach` to `tasks.test` for the existing JVM args configuration.
Reason: Gradle conventions prefer `tasks.test` in single-test-task modules; implicit `latestDepTest` does not justify `withType<Test>().configureEach`.

Unresolved Items

File: build.gradle.kts
Reason: `otel.instrumentation.common.experimental.controller-telemetry.enabled=true` is still enabled on the default `test` task without a dedicated `testExperimental` task; the review instructions classify missing `testExperimental` wiring as manual-only rather than an auto-fix.

Module: dropwizard-views-0.7:javaagent

Module path: instrumentation/dropwizard/dropwizard-views-0.7/javaagent

Summary

Applied 2 safe repository-guideline fixes under instrumentation/dropwizard/dropwizard-views-0.7/javaagent.

Applied Changes

Build

File: build.gradle.kts:21
Change: Changed `tasks.withType<Test>().configureEach` to `tasks.test` for module-wide test properties.
Reason: `gradle-conventions.md` says single-test-task modules should use `tasks.test`; implicit `latestDepTest` does not justify `withType<Test>().configureEach`.

Testing

File: ViewRenderTest.java:62
Change: Changed `testDoesNotCreateSpanWithoutParent()` from `throws InterruptedException, IOException` to a single `throws Exception` clause.
Reason: `testing-general-patterns.md` says `@Test` methods should declare at most one checked exception type.

Module: elasticsearch-api-client-7.16:javaagent

Module path: instrumentation/elasticsearch/elasticsearch-api-client-7.16/javaagent

Summary

Applied and committed safe review fixes for elasticsearch-api-client-7.16 javaagent.

Applied Changes

Javaagent

File: RestClientHttpClientInstrumentation.java:50
Change: Annotated the `@Advice.Enter` `Scope` parameter as `@Nullable`.
Reason: Javaagent advice with `suppress = Throwable.class` can pass `null` from enter advice on suppressed failures; repository nullability guidance requires annotating concrete nullable flows.

Testing

File: ElasticsearchClientTest.java:61
Change: Stored the `RestClient` in a class field and closed it in `@AfterAll` cleanup.
Reason: Repository testing resource-cleanup guidance requires class-scoped resources created during setup to be cleaned up deterministically.

Module: elasticsearch-api-client-7.16:javaagent-unit-tests

Module path: instrumentation/elasticsearch/elasticsearch-api-client-7.16/javaagent-unit-tests

Summary

Applied safe repository-guideline fixes to ElasticsearchEndpointMapTest and committed them.

Applied Changes

Testing/Style

File: ElasticsearchEndpointMapTest.java:26
Change: Made `SEARCH_ENDPOINTS` immutable with `unmodifiableSet(...)`, replaced boolean/map-value assertions with direct AssertJ collection/map assertions, and asserted `observedParams` as the actual value.
Reason: The style guide reserves uppercase static fields for constant-like immutable values, and `testing-general-patterns.md` prefers direct AssertJ collection/map assertions over extracted `contains(...)` or `get(...)` values.


Download code review diagnostics

otelbot Bot added 8 commits April 29, 2026 23:15
Automated code review of instrumentation/couchbase/couchbase-3.2/javaagent.
Automated code review of instrumentation/couchbase/couchbase-common-2.0/javaagent.
Automated code review of instrumentation/couchbase/couchbase-common/testing.
Automated code review of instrumentation/dropwizard/dropwizard-metrics-4.0/javaagent.
Automated code review of instrumentation/dropwizard/dropwizard-testing.
Automated code review of instrumentation/dropwizard/dropwizard-views-0.7/javaagent.
Automated code review of instrumentation/elasticsearch/elasticsearch-api-client-7.16/javaagent.
Automated code review of instrumentation/elasticsearch/elasticsearch-api-client-7.16/javaagent-unit-tests.
@otelbot otelbot Bot requested a review from a team as a code owner April 29, 2026 23:47
@trask trask enabled auto-merge (squash) April 30, 2026 05:10
@trask trask merged commit eb35310 into main Apr 30, 2026
94 checks passed
@trask trask deleted the otelbot/code-review-sweep-25137477817 branch April 30, 2026 05:35
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