Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix JMS Inbound Endpoints for observation #8740

Merged

Conversation

artembilan
Copy link
Member

The JmsMessageDrivenEndpoint delegates all the hard work to the ChannelPublishingJmsMessageListener, but missed to propagate an ObservationRegistry and other related options.
The JmsInboundGateway is worse: it delegated to the JmsMessageDrivenEndpoint

  • Add IntegrationObservation.HANDLER observation to the MessagingGatewaySupport.send() operation: used by the delegate in the ChannelPublishingJmsMessageListener
  • Expose and propagate observation-related options from JmsInboundGateway and JmsMessageDrivenEndpoint
  • Expose observationConvention() option on the MessagingGatewaySpec and MessageProducerSpec

Cherry-pick to 6.1.x & 6.0.x

Related SO question: https://stackoverflow.com/questions/77107286/tracing-in-spring-integration-spring-boot-3-0-9

The `JmsMessageDrivenEndpoint` delegates all the hard work to the
`ChannelPublishingJmsMessageListener`, but missed to propagate an `ObservationRegistry`
and other related options.
The `JmsInboundGateway` is worse: it delegated to the `JmsMessageDrivenEndpoint`

* Add `IntegrationObservation.HANDLER` observation to the `MessagingGatewaySupport.send()`
operation: used by the delegate in the `ChannelPublishingJmsMessageListener`
* Expose and propagate observation-related options from `JmsInboundGateway`
and `JmsMessageDrivenEndpoint`
* Expose `observationConvention()` option on the `MessagingGatewaySpec`
and `MessageProducerSpec`

**Cherry-pick to `6.1.x` & `6.0.x`**
@artembilan artembilan force-pushed the Fix_Delegation_in_JMS_Inbound_Endpoints branch from 8d2271b to 9e261ba Compare September 18, 2023 20:43
The parent process may still use `ObservationRegistry.NOOP` which sets
`Observation.NOOP` instance into the current context and thread local
@tzolov tzolov merged commit 9ad2b8a into spring-projects:main Sep 19, 2023
1 check passed
@tzolov
Copy link
Contributor

tzolov commented Sep 19, 2023

And Cherry-picked to 6.1.x & 6.0.x

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.

2 participants