Skip to content

Code review sweep (run 25245621016)#18507

Merged
trask merged 8 commits into
mainfrom
otelbot/code-review-sweep-25245621016
May 2, 2026
Merged

Code review sweep (run 25245621016)#18507
trask merged 8 commits into
mainfrom
otelbot/code-review-sweep-25245621016

Conversation

@otelbot

@otelbot otelbot Bot commented May 2, 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:

  • spring-jms-2.0:javaagent
  • spring-jms-2.0:testing
  • spring-jms-6.0:javaagent
  • spring-kafka-2.7:javaagent
  • spring-kafka-2.7:library
  • spring-kafka-2.7:testing
  • spring-pulsar-1.0:javaagent
  • spring-pulsar-1.0:testing
  • spring-rabbit-1.0:javaagent
  • spring-rmi-4.0:javaagent

Module: spring-jms-2.0:javaagent

Module path: instrumentation/spring/spring-jms/spring-jms-2.0/javaagent

Summary

Applied one safe repository-guideline fix in spring-jms-2.0 javaagent and committed it.

Applied Changes

Style

File: SpringTemplateTest.java:59
Change: Moved `MESSAGE_TEXT` before mutable static fields.
Reason: Repository style guide class organization requires `static final` fields before non-final static fields.

Module: spring-jms-2.0:testing

Module path: instrumentation/spring/spring-jms/spring-jms-2.0/testing

Summary

Applied and committed one safe repository-guideline fix in spring-jms-2.0/testing.

Applied Changes

Style

File: AbstractJmsTest.java:29
Change: Moved duplicate `@SuppressWarnings("deprecation")` annotations from two methods to class scope while preserving the `using deprecated semconv` explanation.
Reason: `knowledge/general-rules.md` says `@SuppressWarnings` should be placed on the class when two or more members need the same suppression, and explanatory suppression comments should be preserved.

Module: spring-jms-6.0:javaagent

Module path: instrumentation/spring/spring-jms/spring-jms-6.0/javaagent

Summary

Applied and committed one safe repository-guideline fix for spring-jms-6.0 javaagent.

Applied Changes

Style

File: AbstractSpringJmsListenerTest.java:33
Change: Restricted the `logger` and `broker` static fields to `private` visibility.
Reason: Repository style guide requires minimal necessary visibility and says static fields should be `private` unless they are constant-like exported fields.

Module: spring-kafka-2.7:javaagent

Module path: instrumentation/spring/spring-kafka-2.7/javaagent

Summary

Applied safe repository-guideline fixes for spring-kafka-2.7 javaagent and committed them.

Applied Changes

Build

File: build.gradle.kts:80
Change: Updated `metadataConfig` for `testExperimental` to include both experimental JVM args and added `metadataConfig` to the default `test` task for receive telemetry.
Reason: Gradle conventions require existing `metadataConfig` values to describe the non-default configuration active in each `Test` task.

Javaagent

File: ListenerConsumerInstrumentation.java:92
Change: Renamed `AdviceScope.enter()`/`exit()` to `start()`/`end()` and updated call sites.
Reason: Javaagent advice guidance uses `start()` and `end()` as the canonical `AdviceScope` method names for ordinary tracing advice.

Testing

File: SpringKafkaTest.java:63
Change: Renamed the experimental test flag constant from `EXPERIMENTAL_ATTRIBUTES_ENABLED` to `EXPERIMENTAL_ATTRIBUTES`.
Reason: Testing guidance standardizes experimental attribute mode checks on a per-module `EXPERIMENTAL_ATTRIBUTES` constant.

Module: spring-kafka-2.7:library

Module path: instrumentation/spring/spring-kafka-2.7/library

Summary

No safe repository-guideline fixes were applied under instrumentation/spring/spring-kafka-2.7/library; the only deterministic style candidate conflicted with existing spotlessJava formatting and was reverted.

Applied Changes

No safe automated changes were applied.

Module: spring-kafka-2.7:testing

Module path: instrumentation/spring/spring-kafka-2.7/testing

Summary

Applied safe review fixes for spring-kafka-2.7 testing by removing a shared non-semconv AttributeKey constant and inlining stringKey("messaging.client_id") at assertion sites.

Applied Changes

Testing

File: AbstractSpringKafkaTest.java:37
Change: Removed the shared `MESSAGING_CLIENT_ID` `AttributeKey` constant and its now-unused import.
Reason: `testing-general-patterns.md` says non-semconv attribute keys in test assertions should use inline `AttributeKey` factory methods; constants are reserved for semconv keys.

File: SpringKafkaTest.java:96
Change: Replaced `MESSAGING_CLIENT_ID` assertion references with inline `stringKey("messaging.client_id")`.
Reason: Required compile-ready caller update after removing the shared test fixture constant, and aligns assertions with `testing-general-patterns.md` guidance for non-semconv attribute keys.

Module: spring-pulsar-1.0:javaagent

Module path: instrumentation/spring/spring-pulsar-1.0/javaagent

Summary

Applied and committed safe review fixes for spring-pulsar-1.0 javaagent test metadata configuration.

Applied Changes

Build

File: build.gradle.kts:54
Change: Added `metadataConfig` system properties for the non-default `testReceiveSpansDisabled` suite and default `test` task.
Reason: Repository Gradle conventions require existing `collectMetadata` wiring to pair each non-default test configuration with matching `metadataConfig`, so metadata collection records the active `otel.instrumentation.*` flags.

Module: spring-pulsar-1.0:testing

Module path: instrumentation/spring/spring-pulsar-1.0/testing

Summary

Applied one safe repository-guideline fix in spring-pulsar-1.0 testing and committed it as 3b6964fb.

Applied Changes

Style

File: AbstractSpringPulsarTest.java:68
Change: Changed `brokerHost` and `brokerPort` from `protected static` to `private static`.
Reason: Repository style guide requires minimal necessary visibility; these fields are only used inside `AbstractSpringPulsarTest`.

Module: spring-rabbit-1.0:javaagent

Module path: instrumentation/spring/spring-rabbit-1.0/javaagent

Summary

Reviewed all files under instrumentation/spring/spring-rabbit-1.0/javaagent; no safe repository-guideline fixes were needed.

Applied Changes

No safe automated changes were applied.

Module: spring-rmi-4.0:javaagent

Module path: instrumentation/spring/spring-rmi-4.0/javaagent

Summary

Applied one safe repository-guideline fix in spring-rmi-4.0 javaagent: removed unused AutoValue dependency declarations from build.gradle.kts.

Applied Changes

Build

File: build.gradle.kts:16
Change: Removed unused `compileOnly("com.google.auto.value:auto-value-annotations")` and `annotationProcessor("com.google.auto.value:auto-value")` dependency declarations.
Reason: `gradle-conventions.md` says to flag/remove dependencies that appear unused or redundant; no module source references `AutoValue` or generated AutoValue types.


Download code review diagnostics

otelbot Bot added 8 commits May 2, 2026 06:24
Automated code review of instrumentation/spring/spring-jms/spring-jms-2.0/javaagent.
Automated code review of instrumentation/spring/spring-jms/spring-jms-2.0/testing.
Automated code review of instrumentation/spring/spring-jms/spring-jms-6.0/javaagent.
Automated code review of instrumentation/spring/spring-kafka-2.7/javaagent.
Automated code review of instrumentation/spring/spring-kafka-2.7/testing.
Automated code review of instrumentation/spring/spring-pulsar-1.0/javaagent.
Automated code review of instrumentation/spring/spring-pulsar-1.0/testing.
Automated code review of instrumentation/spring/spring-rmi-4.0/javaagent.
@otelbot otelbot Bot requested a review from a team as a code owner May 2, 2026 06:55
@trask trask merged commit 723a8a0 into main May 2, 2026
100 checks passed
@trask trask deleted the otelbot/code-review-sweep-25245621016 branch May 2, 2026 15:55
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