Instrument @JmsListener session for response messages
Prior to this commit, the observation instrumentation for `@JmsListener` annotated methods (implemented in `AbstractMessageListenerContainer` would not instrument the JMS session using the Micrometer JMS support. This means that response messages returned from the listener method would be sent but no observation would be recorded. As a result, tracing message properties would be also missing. This commit ensures that the session provided to the listener method is instrumented beforehand, if Micrometer is on the classpath and an observation registry has been configured. Fixes gh-33221
This commit is contained in:
@@ -162,6 +162,8 @@ include-code::./JmsTemplatePublish[]
|
||||
|
||||
It uses the `io.micrometer.jakarta9.instrument.jms.DefaultJmsPublishObservationConvention` by default, backed by the `io.micrometer.jakarta9.instrument.jms.JmsPublishObservationContext`.
|
||||
|
||||
Similar observations are recorded with `@JmsListener` annotated methods when response messages are returned from the listener method.
|
||||
|
||||
[[observability.jms.process]]
|
||||
=== JMS message Processing instrumentation
|
||||
|
||||
|
||||
Reference in New Issue
Block a user