Merged
Conversation
Automated code review of instrumentation/rabbitmq-2.7/javaagent.
trask
approved these changes
Apr 6, 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.
Summary
Applied 4 safe review fixes under
instrumentation/rabbitmq-2.7/javaagent: aligned concrete nullable parameters with actualnullflows and added missingsuppress = Throwable.classon non-trivial ByteBuddy advice.Applied Changes
Javaagent
File:
RabbitChannelInstrumentation.java:132Change: Added
suppress = Throwable.classtoChannelMethodAdvice.onEnter()andChannelGetAdvice.takeTimestamp(), and markedChannelGetAdvice/ChannelMethodAdviceScopethrowable and response inputs@Nullablewhere the advice path can supplynull.Reason:
javaagent-advice-patterns.mdrequiressuppress = Throwable.classon non-trivial advice, andgeneral-rules.mdrequires@Nullablewhen concrete callers such as@Advice.Return/@Advice.Throwncan passnull.File:
RabbitCommandInstrumentation.java:52Change: Added
suppress = Throwable.classtoCommandConstructorAdvice.setSpanNameAddHeaders().Reason:
javaagent-advice-patterns.mdsays non-trivial@Advice.OnMethodExitbodies should usesuppress = Throwable.classso instrumentation failures do not escape into application code.Nullability
File:
RabbitSingletons.java:112Change: Annotated
buildMessagingAttributesExtractor(..., operation)with@NullableforMessageOperation operation.Reason:
general-rules.mdsays parameters must be marked@Nullablewhen real callers passnull;createChannelInstrumenter(false)passesnullfor the non-publish case.File:
ReceiveRequest.java:16Change: Annotated
ReceiveRequest.create(..., response, ...)soresponseis@Nullable.Reason:
general-rules.mdrequires@Nullableon parameters that are actually passednull; thebasicGetreceive path can constructReceiveRequestwith anullGetResponsewhen no message is returned.Download code review diagnostics