Code review sweep (run 24961972815)#18316
Merged
Merged
Conversation
Automated code review of instrumentation/geode-1.4/javaagent.
Automated code review of instrumentation/google-http-client-1.19/javaagent.
Automated code review of instrumentation/graphql-java/graphql-java-20.0/javaagent.
Automated code review of instrumentation/graphql-java/graphql-java-20.0/library.
Automated code review of instrumentation/graphql-java/graphql-java-common-12.0/library.
Automated code review of instrumentation/graphql-java/graphql-java-common-12.0/testing.
Automated code review of instrumentation/grpc-1.6/javaagent.
Automated code review of instrumentation/grpc-1.6/library.
Automated code review of instrumentation/grpc-1.6/testing.
trask
reviewed
Apr 26, 2026
Comment on lines
-56
to
-61
| // exclude our grpc library instrumentation, the ContextStorageOverride contained within it | ||
| // breaks the tests | ||
| classpath = classpath.filter { | ||
| !it.absolutePath.contains("opentelemetry-grpc-1.6") | ||
| } | ||
|
|
Member
There was a problem hiding this comment.
this is already under withType<Test>().configureEach
656dcc2 to
59d62f4
Compare
trask
approved these changes
Apr 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated code review sweep walked the following modules in order
and stopped after accumulating at least 10 modified files:
geode-1.4:javaagentgoogle-http-client-1.19:javaagentgrails-3.0:javaagentgraphql-java-12.0:javaagentgraphql-java-12.0:librarygraphql-java-20.0:javaagentgraphql-java-20.0:librarygraphql-java-common-12.0:librarygraphql-java-common-12.0:testinggrizzly-2.3:javaagentgrpc-1.6:javaagentgrpc-1.6:librarygrpc-1.6:testingModule:
geode-1.4:javaagentModule path:
instrumentation/geode-1.4/javaagentSummary
Added the missing
declarative_namemapping ininstrumentation/geode-1.4/metadata.yamlso the Geode module's documented DB query sanitization config follows the requiredmetadata.yamlformat and passes declarative-config validation.Applied Changes
Config
File:
metadata.yaml:8Change: Added `declarative_name: java.common.db.query_sanitization.enabled` to the `otel.instrumentation.common.db.query-sanitization.enabled` entry.
Reason: `metadata-yaml-format.md` requires each instrumentation `metadata.yaml` config entry to declare its `declarative_name`; comparable DB instrumentations already use `java.common.db.query_sanitization.enabled` for this shared config.
Module:
google-http-client-1.19:javaagentModule path:
instrumentation/google-http-client-1.19/javaagentSummary
Applied a safe nullability-accuracy fix in
GoogleHttpRequestInstrumentationfor thegoogle-http-client-1.19javaagent review scope.Applied Changes
Nullability
File:
GoogleHttpRequestInstrumentation.java:76Change: Annotated the advice helper and `@Advice` exit parameters with `@Nullable` where ByteBuddy can supply `null`, including the `HttpResponse` return value and `Throwable` parameters passed through `AdviceScope`.
Reason: Repository nullability guidance in `knowledge/general-rules.md` requires annotating parameters that can actually be `null`; here `@Advice.Return` is `null` on exceptional exit and `@Advice.Thrown` is `null` on successful exit, so the helper signatures should reflect that runtime flow.
Module:
grails-3.0:javaagentModule path:
instrumentation/grails-3.0/javaagentSummary
Reviewed
instrumentation/grails-3.0/javaagentandinstrumentation/grails-3.0/metadata.yaml; no safe repository-guideline fixes were needed, and:instrumentation:grails-3.0:javaagent:checkpassed both normally and with-PtestLatestDeps=true.Applied Changes
No safe automated changes were applied.
Module:
graphql-java-12.0:javaagentModule path:
instrumentation/graphql-java/graphql-java-12.0/javaagentSummary
Reviewed
instrumentation/graphql-java/graphql-java-12.0/javaagentand its modulemetadata.yaml; no deterministic repository-guideline fixes were needed.Applied Changes
No safe automated changes were applied.
Module:
graphql-java-12.0:libraryModule path:
instrumentation/graphql-java/graphql-java-12.0/librarySummary
Reviewed
instrumentation/graphql-java/graphql-java-12.0/libraryand its modulemetadata.yaml; no safe repository-guideline fixes were needed.Applied Changes
No safe automated changes were applied.
Module:
graphql-java-20.0:javaagentModule path:
instrumentation/graphql-java/graphql-java-20.0/javaagentSummary
Applied one safe review fix in
graphql-java-20.0/javaagent:GraphqlInstrumentationnow uses the repository-standard helper-injectionInitAdviceshape for itsnone()-matched advice instead of a never-run@Advice.Returnbridge.Applied Changes
Javaagent
File:
GraphqlInstrumentation.java:38Change: Replaced the `none()`-matched `AddInstrumentationAdvice` return-bridging stub with an `InitAdvice` helper-registration stub that only references `GraphqlSingletons` for injection.
Reason: `knowledge/javaagent-advice-patterns.md` says helper-injection-only advice selected with `none()` should use a dummy init-style advice and that `suppress = Throwable.class` and a fake `@Advice.Return` bridge are meaningless when the advice never runs.
Module:
graphql-java-20.0:libraryModule path:
instrumentation/graphql-java/graphql-java-20.0/librarySummary
Applied 1 safe review fix in
instrumentation/graphql-java/graphql-java-20.0/libraryand confirmed the modulemetadata.yamlconfigs are wired in code; no unresolved issues remain.Applied Changes
Style
File:
Graphql20OpenTelemetryInstrumentationState.java:31Change: Reduced `setContextForPath(...)` and `getParentContextForPath(...)` from `public` to package-private.
Reason: The style guide requires minimal necessary visibility. Both helpers are only used from the same package, so package-private matches the intended scope better than `public`.
Module:
graphql-java-common-12.0:libraryModule path:
instrumentation/graphql-java/graphql-java-common-12.0/librarySummary
Applied 1 safe correctness fix in
graphql-java-common-12.0by guarding the shared GraphQL request span status extractor against a nullableExecutionResult.Applied Changes
General
File:
OpenTelemetryInstrumentationHelper.java:67Change: Added an `executionResult != null` guard before reading `executionResult.getErrors()` in `setSpanStatusExtractor()`.
Reason: The review checklist's `[General]` correctness rule requires fixing real defects, and this instrumenter callback can receive a nullable `ExecutionResult` on failed executions.
Module:
graphql-java-common-12.0:testingModule path:
instrumentation/graphql-java/graphql-java-common-12.0/testingSummary
Applied 1 safe review fix in
instrumentation/graphql-java/graphql-java-common-12.0/testing;AbstractGraphqlTestnow fails fast withrequireNonNull(...)ifschema.graphqlsis missing, aligning with the review checklist's correctness and reliability rules for shared test infrastructure.Applied Changes
General
File:
AbstractGraphqlTest.java:19Change: Wrapped `getResourceAsStream("schema.graphqls")` with `requireNonNull(...)` in `setup()` and added the matching static import.
Reason: `general-rules.md` requires fixing deterministic correctness and reliability issues; the shared test base should fail immediately with a clear missing-resource error instead of relying on an implicit `NullPointerException` from `InputStreamReader` construction.
Module:
grizzly-2.3:javaagentModule path:
instrumentation/grizzly-2.3/javaagentSummary
Reviewed all files under
instrumentation/grizzly-2.3/javaagentand validatedinstrumentation/grizzly-2.3/metadata.yamlagainst the module’s current patterns; no safe repository-guideline fixes were needed.Applied Changes
No safe automated changes were applied.
Module:
grpc-1.6:javaagentModule path:
instrumentation/grpc-1.6/javaagentSummary
Applied one safe
grpc-1.6 javaagentreview fix:build.gradle.ktsnow relies on the existing sharedwithType<Test>().configureEachclasspath exclusion instead of repeating the same gRPC library filter in each custom test task.metadata.yamlwas validated against actual config usage and needed no changes.Applied Changes
Build
File:
build.gradle.kts:52Change: Removed the duplicated `classpath` filter blocks from `testExperimental`, `testStableSemconv`, and `testBothSemconv`, keeping the shared exclusion only in `withType<Test>().configureEach`.
Reason: Repository Gradle guidance prefers shared configuration for behavior that applies to every explicit `Test` task; repeating the same classpath mutation in each task is unnecessary duplication.
Module:
grpc-1.6:libraryModule path:
instrumentation/grpc-1.6/librarySummary
Applied 1 safe review fix in
instrumentation/grpc-1.6/library:GrpcTest.javanow inlines non-semconv test attribute keys instead of storing them in class-level constants, matching the repository’s test-assertion guidance.Applied Changes
Testing
File:
GrpcTest.java:39Change: Inlined `stringKey("customKey")` and `stringKey("customKey2")` at the `hasAttribute(...)` assertions and helper extractors, and removed the `CUSTOM_KEY` / `CUSTOM_KEY2` constants.
Reason: Repository testing guidance says non-semconv attribute keys in test assertions should use inline `AttributeKey` factory methods instead of class-level constants; removing the constants keeps the test aligned with that rule.
Module:
grpc-1.6:testingModule path:
instrumentation/grpc-1.6/testingSummary
Applied safe
Testingfixes ininstrumentation/grpc-1.6/testingby converting non-exact metric point assertions tohasAttributesSatisfyingExactly(...)and adding a shared helper so old client metric assertions still match both default and-PtestLatestDeps=trueshapes. Requiredtestingandlibraryvalidations completed successfully;:instrumentation:grpc-1.6:javaagent:check -PtestLatestDeps=truestill fails in an unrelated pre-existing test.Applied Changes
Testing
File:
AbstractGrpcStreamingTest.java:305Change: Replaced non-exact client and server metric point assertions with `hasAttributesSatisfyingExactly(...)` and routed old client metric assertions through `addExtraClientMetricAttributes(...)`.
Reason: Repository `testing-general-patterns.md` requires exact attribute assertions because non-exact variants can ignore unexpected attributes; the helper keeps the assertion exact while matching the `testLatestDeps`-specific client metric shape.
File:
AbstractGrpcTest.java:1719Change: Converted remaining non-exact metric point assertions to `hasAttributesSatisfyingExactly(...)` and added `addExtraClientMetricAttributes(...)` for old client metrics that only include `NETWORK_TYPE` under `testLatestDeps`.
Reason: Repository `testing-general-patterns.md` prefers exact attribute assertions, and the shared helper makes that fix deterministic across both dependency modes instead of relying on permissive matching.
Unresolved Items
File:
GrpcTest.javaReason: `:instrumentation:grpc-1.6:javaagent:check -PtestLatestDeps=true` still fails in `clientCallAfterServerCompleted()` because the test now observes `StatusRuntimeException: CANCELLED: io.grpc.Context was cancelled without error` instead of the expected `null`; this failure is outside the modified shared testing sources and remained after the review fixes passed `testing` and `library` validation.
Download code review diagnostics