Code review sweep (run 24857196932)#18243
Merged
Merged
Conversation
Automated code review of instrumentation/opentelemetry-instrumentation-api/javaagent.
Automated code review of instrumentation/opentelemetry-instrumentation-api/testing.
Automated code review of instrumentation/oracle-ucp-11.2/javaagent.
Automated code review of instrumentation/oshi/javaagent.
Automated code review of instrumentation/oshi/library.
Automated code review of instrumentation/oshi/testing.
Automated code review of instrumentation/pekko/pekko-actor-1.0/javaagent.
trask
approved these changes
Apr 24, 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:
opentelemetry-instrumentation-api:javaagentopentelemetry-instrumentation-api:testingoracle-ucp-11.2:javaagentoracle-ucp-11.2:libraryoracle-ucp-11.2:testingoshi:javaagentoshi:libraryoshi:testingpayara:javaagentpekko-actor-1.0:javaagentModule:
opentelemetry-instrumentation-api:javaagentModule path:
instrumentation/opentelemetry-instrumentation-api/javaagentSummary
Reviewed
instrumentation/opentelemetry-instrumentation-api/javaagent; applied one safe test cleanup fix inContextBridgeTestand found no other deterministic repository-guideline fixes in scope.Applied Changes
Testing
File:
ContextBridgeTest.java:36Change: Added `AutoCleanupExtension` and deferred cleanup of the test-created `OpenTelemetrySdk` in `testSpanKeyBridge_UnbridgedSpan()`.
Reason: `testing-general-patterns.md` prefers `AutoCleanupExtension` with `deferCleanup(...)` for `AutoCloseable` resources that remain live for most of a test; this fixes the unclosed `OpenTelemetrySdk` created by the test.
Module:
opentelemetry-instrumentation-api:testingModule path:
instrumentation/opentelemetry-instrumentation-api/testingSummary
Applied 1 safe review fix in
instrumentation/opentelemetry-instrumentation-api/testing: renamed the uppercaseInstrumentercollaborator field inAgentSpanTestingInstrumenterto lower camel case to match repository style guidance. No other deterministic fixes were needed in scope.Applied Changes
Style
File:
AgentSpanTestingInstrumenter.java:31Change: Renamed `HTTP_SERVER_INSTRUMENTER` to `httpServerInstrumenter` and updated its call sites.
Reason: The style guide says runtime-created collaborator objects such as instrumenters should use lower camel case, not `SCREAMING_SNAKE_CASE`, which is reserved for constants and stable semantic handles.
Module:
oracle-ucp-11.2:javaagentModule path:
instrumentation/oracle-ucp-11.2/javaagentSummary
Applied 1 safe review fix under
instrumentation/oracle-ucp-11.2/javaagent: renamed the stored telemetry singleton inOracleUcpSingletons.javaso the field name matches the exportedtelemetry()accessor per the repository*Singletonsnaming rule. Required validation completed with:instrumentation:oracle-ucp-11.2:javaagent:check,:instrumentation:oracle-ucp-11.2:javaagent:check -PtestLatestDeps=true, and./gradlew spotlessApply.Applied Changes
Javaagent
File:
OracleUcpSingletons.java:13Change: Renamed the private static `OracleUcpTelemetry` field from `oracleUcpTelemetry` to `telemetry` and updated `telemetry()` to return the renamed field.
Reason: Repository `*Singletons` guidance says exported lower-camel collaborators should use a field name that exactly matches the zero-arg accessor returning that stored singleton.
Module:
oracle-ucp-11.2:libraryModule path:
instrumentation/oracle-ucp-11.2/librarySummary
No safe repository-guideline fixes were needed under
instrumentation/oracle-ucp-11.2/library; the reviewed sources already match the applicable library, testing, Gradle, andmetadata.yamlrules for this scope.Applied Changes
No safe automated changes were applied.
Module:
oracle-ucp-11.2:testingModule path:
instrumentation/oracle-ucp-11.2/testingSummary
Reviewed
instrumentation/oracle-ucp-11.2/testingand the modulemetadata.yaml; no safe repository-guideline fixes were needed.Applied Changes
No safe automated changes were applied.
Module:
oshi:javaagentModule path:
instrumentation/oshi/javaagentSummary
Applied one safe review fix in
oshi: added the missingdeclarative_namemapping ininstrumentation/oshi/metadata.yamlso the module metadata matches the repository's mandatorymetadata.yamlformat for instrumentation configs.Applied Changes
Config
File:
metadata.yaml:8Change: Added `declarative_name: java.oshi.experimental_metrics/development.enabled` for `otel.instrumentation.oshi.experimental-metrics.enabled`.
Reason: `metadata-yaml-format.md` requires every instrumentation config entry to declare the declarative mapping, and experimental flat names must map to a `/development` declarative path.
Module:
oshi:libraryModule path:
instrumentation/oshi/librarySummary
Applied two safe review fixes in
instrumentation/oshi/libraryby reducing unnecessarypublicvisibility on JUnit@RegisterExtensionfields;instrumentation/oshi/metadata.yamlwas also reviewed and its config wiring matches the module'soshiinstrumentation config lookup.Applied Changes
Style
File:
ProcessMetricsTest.java:22Change: Changed the `@RegisterExtension` field `testing` from `public static final` to package-private `static final`.
Reason: Repository visibility rules prefer the minimum necessary visibility, and JUnit 5 test classes and members do not need `public` access here.
File:
SystemMetricsTest.java:22Change: Changed the `@RegisterExtension` field `testing` from `public static final` to package-private `static final`.
Reason: Repository visibility rules prefer the minimum necessary visibility, and JUnit 5 test classes and members do not need `public` access here.
Module:
oshi:testingModule path:
instrumentation/oshi/testingSummary
Applied 2 safe fixes under
instrumentation/oshi/testing: the shared OSHI metric helper assertions now use thesum/gaugeassertion subjects directly viasatisfies(...)while preserving the existing.anySatisfy(...)point checks.Applied Changes
test
File:
AbstractProcessMetricsTest.java:37Change: Reworked the `runtime.java.memory` and `runtime.java.cpu_time` assertions to read points from the `sum`/`gauge` subject passed into `hasLongSumSatisfying(...)` and `hasLongGaugeSatisfying(...)` instead of re-reading them from the outer `metric`.
Reason: This is a safe clarity fix aligned with the repository rule to reuse the current assertion subject instead of duplicating access paths, while preserving existing assertion behavior.
File:
AbstractSystemMetricsTest.java:35Change: Reworked the `system.memory.usage` and `system.memory.utilization` assertions to read points from the `sum`/`gauge` subject passed into `hasLongSumSatisfying(...)` and `hasDoubleGaugeSatisfying(...)` instead of re-reading them from the outer `metric`.
Reason: This is a safe clarity fix aligned with the repository rule to keep changes surgical and assertion logic anchored to the active subject, without changing expected metric matching semantics.
Module:
payara:javaagentModule path:
instrumentation/payara/javaagentSummary
Reviewed
instrumentation/payara/javaagentand the modulemetadata.yaml; no safe repository-guideline fixes were needed.Applied Changes
No safe automated changes were applied.
Module:
pekko-actor-1.0:javaagentModule path:
instrumentation/pekko/pekko-actor-1.0/javaagentSummary
Applied safe nullability fixes in the Pekko actor
javaagentadvice code so nullable ByteBuddy submit-state paths are declared accurately and consistently with repository guidance.Applied Changes
Nullability
File:
PekkoDispatcherInstrumentation.java:18Change: Added `@Nullable` to the `PropagatedContext` enter result and to the `@Advice.Enter` / `@Advice.Thrown` exit parameters in `DispatchEnvelopeAdvice`.
Reason: The repository `Nullability correctness` rule requires annotating parameters and return values when `null` is actually produced; this advice returns `null` when context propagation is skipped, and ByteBuddy supplies `null` for `@Advice.Thrown` on successful calls.
File:
PekkoDefaultSystemMessageQueueInstrumentation.java:20Change: Added `@Nullable` to the `PropagatedContext` enter result and to the `@Advice.Enter` / `@Advice.Thrown` exit parameters in `DispatchSystemAdvice`.
Reason: The repository `Nullability correctness` rule requires annotating parameters and return values when `null` is actually produced; this advice returns `null` when context propagation is skipped, and ByteBuddy supplies `null` for `@Advice.Thrown` on successful calls.
Download code review diagnostics