Skip to content

Migrate RabbitMQ messaging telemetry to v1.43 preview#19274

Draft
trask wants to merge 4 commits into
open-telemetry:mainfrom
trask:messaging-v1-43-rabbitmq
Draft

Migrate RabbitMQ messaging telemetry to v1.43 preview#19274
trask wants to merge 4 commits into
open-telemetry:mainfrom
trask:messaging-v1-43-rabbitmq

Conversation

@trask

@trask trask commented Jul 19, 2026

Copy link
Copy Markdown
Member

Depends on #19268.

Dependency baseline: 9b5ec57607668f417ce57a15c2281897fcb3f774.
Review only: 9b5ec57607668f417ce57a15c2281897fcb3f774..8a9f68d1154772e955713bd4b68e20415896e3dc.

Exactly one RabbitMQ commit. Core and Spring Rabbit use typed telemetry, generated destination handling, routing-key/delivery-tag attributes, and stable server identity. Generic commands avoid deprecated null-operation builders. Preview metadata labels match actual JVM args. basicGet supplies messaging.batch.message_count=0/1 through an operation-listener-only extractor, so empty receives do not increment counters and the count attribute is not added to spans.

Validated: full RabbitMQ and Spring Rabbit checks across legacy/stable/indy, including metadata and Spotless.

@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Jul 19, 2026

Copy link
Copy Markdown

Pull request dashboard status

Status last refreshed: 2026-07-22 20:45:48 UTC.

  • Waiting on: Author
  • Next step: Move out of draft to request review.

This automated status or its linked feedback items may be incorrect. If something looks wrong, please report it with the result you expected.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Migrates RabbitMQ and Spring Rabbit instrumentation toward v1.43 preview messaging semantics.

Changes:

  • Adopts new messaging operation types and receive span kind.
  • Uses shared process topology for consumer spans.
  • Adds targeted preview validation for receive span kind.

Reviewed changes

Copilot reviewed 35 out of 35 changed files in this pull request and generated 6 comments.

File Description
instrumentation/rabbitmq-2.7/javaagent/build.gradle.kts Adds preview test execution.
instrumentation/rabbitmq-2.7/javaagent/src/main/.../RabbitSingletons.java Migrates RabbitMQ instrumenters.
instrumentation/rabbitmq-2.7/javaagent/src/test/.../RabbitMqTest.java Tests preview receive span kind.
instrumentation/spring/spring-rabbit-1.0/javaagent/src/main/.../SpringRabbitSingletons.java Migrates Spring Rabbit processing instrumentation.

Comment thread instrumentation/rabbitmq-2.7/javaagent/build.gradle.kts Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 41 out of 41 changed files in this pull request and generated 4 comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 41 out of 41 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

instrumentation/spring/spring-rabbit-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/spring/rabbit/v1_0/SpringRabbitMessageAttributesGetter.java:94

  • [General] This misses anonymous queues on the module's supported older Spring AMQP versions. The module supports spring-rabbit:1.0.0.RELEASE (build.gradle.kts:15), where MessageProperties#getConsumerQueue() is absent, so this helper returns null; the generated amq.gen-*/spring.gen-* routing key then enters the preview span name instead of producing just process. Also fall back to the received routing key when classifying the destination.

@trask
trask force-pushed the messaging-v1-43-rabbitmq branch from 4817ea8 to e6bd0d7 Compare July 20, 2026 15:27
@trask
trask requested a review from Copilot July 20, 2026 15:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 41 out of 41 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

instrumentation/spring/spring-rabbit-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/spring/rabbit/v1_0/SpringRabbitMessageAttributesGetter.java:93

  • [General] On the supported Spring AMQP 1.0 baseline (build.gradle.kts:15), MessageProperties has no getConsumerQueue(), so this always checks null. For an anonymous queue the generated name is still available as the received routing key; preview mode will therefore emit process spring.gen-… instead of omitting the anonymous destination. Fall back to the routing key when the consumer-queue accessor is unavailable.

@trask
trask force-pushed the messaging-v1-43-rabbitmq branch from e6bd0d7 to a515ee0 Compare July 21, 2026 06:05
@trask
trask requested a review from Copilot July 21, 2026 06:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 41 out of 41 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (1)

instrumentation/spring/spring-rabbit-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/spring/rabbit/v1_0/SpringRabbitMessageAttributesGetter.java:94

  • [General] On supported Spring AMQP versions that predate MessageProperties.getConsumerQueue() (the reason this accessor is reflective), getConsumerQueue(...) always returns null. A generated default-exchange queue is still available as receivedRoutingKey, so this currently classifies it as non-anonymous and emits process <random queue> in preview mode. Fall back to the routing key when the consumer-queue accessor is unavailable.

@trask
trask force-pushed the messaging-v1-43-rabbitmq branch from a515ee0 to ee41851 Compare July 21, 2026 06:21
@trask
trask requested a review from Copilot July 21, 2026 06:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 41 out of 41 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (1)

instrumentation/spring/spring-rabbit-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/spring/rabbit/v1_0/SpringRabbitMessageAttributesGetter.java:94

  • [General] On the module's supported baseline (spring-rabbit:1.0.0.RELEASE), MessageProperties.getConsumerQueue() does not exist, so the reflective helper always returns null. Anonymous baseline queues still expose their generated amq.gen-*/spring.gen-* name through getReceivedRoutingKey(), but this method classifies them as non-anonymous and the stable span name becomes high-cardinality (process <generated id>). Fall back to the received routing key when the consumer-queue method is unavailable.

@trask
trask force-pushed the messaging-v1-43-rabbitmq branch from ee41851 to b902f07 Compare July 21, 2026 06:48
@trask
trask requested a review from Copilot July 21, 2026 06:51
@trask
trask force-pushed the messaging-v1-43-rabbitmq branch from b902f07 to b43d960 Compare July 21, 2026 06:58

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 45 out of 45 changed files in this pull request and generated 4 comments.

@trask
trask force-pushed the messaging-v1-43-rabbitmq branch from ec5eb7f to 0aa3b99 Compare July 21, 2026 21:59
@trask
trask requested a review from Copilot July 21, 2026 21:59

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 48 out of 48 changed files in this pull request and generated 4 comments.

@trask
trask force-pushed the messaging-v1-43-rabbitmq branch from 0aa3b99 to 7130732 Compare July 22, 2026 02:10
@trask
trask requested a review from Copilot July 22, 2026 02:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 48 out of 48 changed files in this pull request and generated no new comments.

@trask
trask force-pushed the messaging-v1-43-rabbitmq branch from 7130732 to a178037 Compare July 22, 2026 17:22
@trask
trask requested a review from Copilot July 22, 2026 17:22

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 48 out of 48 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 48 out of 48 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

instrumentation/spring/spring-rabbit-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/spring/rabbit/v1_0/SpringRabbitMessageAttributesGetter.java:93

  • [General] The module supports Spring Rabbit 1.0.0, where MessageProperties has no getConsumerQueue(), so this always classifies its UUID-based AnonymousQueue as named. That makes preview process spans include the random UUID in their name and omit messaging.destination.anonymous=true. Fall back to the received routing key, which Spring Rabbit 1.0 does expose, when the consumer-queue method is unavailable.

@trask
trask force-pushed the messaging-v1-43-rabbitmq branch from a178037 to 000c867 Compare July 22, 2026 18:23
@trask
trask requested a review from Copilot July 22, 2026 18:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 48 out of 48 changed files in this pull request and generated no new comments.

@trask
trask force-pushed the messaging-v1-43-rabbitmq branch from 000c867 to 6249d50 Compare July 22, 2026 20:19
@trask
trask requested a review from Copilot July 22, 2026 20:20

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 49 out of 49 changed files in this pull request and generated 1 comment.

@trask
trask force-pushed the messaging-v1-43-rabbitmq branch from 6249d50 to 8a9f68d Compare July 22, 2026 20:34
@trask
trask requested a review from Copilot July 22, 2026 20:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 49 out of 49 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

instrumentation/spring/spring-rabbit-1.0/javaagent/src/main/java/io/opentelemetry/javaagent/instrumentation/spring/rabbit/v1_0/SpringRabbitMessageAttributesGetter.java:94

  • [General] On the supported Spring AMQP 1.0 baseline, MessageProperties has no getConsumerQueue(), so this always checks null. For default-exchange deliveries to generated queues, getReceivedRoutingKey() still contains the generated queue name; preview mode therefore emits process <random-name> and omits messaging.destination.anonymous. Fall back to the routing key when the reflected queue is unavailable and the received exchange is the default exchange.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants