Class ObservationPropagationChannelInterceptor

java.lang.Object
org.springframework.integration.channel.interceptor.ThreadStatePropagationChannelInterceptor<io.micrometer.observation.Observation>
org.springframework.integration.channel.interceptor.ObservationPropagationChannelInterceptor
All Implemented Interfaces:
ChannelInterceptor, ExecutorChannelInterceptor

@Deprecated(since="6.1.7", forRemoval=true) public class ObservationPropagationChannelInterceptor extends ThreadStatePropagationChannelInterceptor<io.micrometer.observation.Observation>
Deprecated, for removal: This API element is subject to removal in a future version.
since 6.1.7 for removal in 6.4 in favor of enabling observation on the channel and its consumer.
The ExecutorChannelInterceptor implementation responsible for an Observation propagation from one message flow's thread to another through the MessageChannels involved in the flow. Opens a new Observation.Scope on another thread and cleans up it in the end.

NOTE: This interceptor is proven to be wrong since an existing observation usually is closed on the sender side before the message is consumed on the receiver side. Therefore, it is better to have a sender observation on this channel, and then receiver observation on a subscriber for this channel. This way a tracing information is stored into message headers passing this channel. Such an approach also eliminate a problem with persistent message channels where an Observation is not serializable to be stored into database as a part of the message.

Since:
6.0
Author:
Artem Bilan
  • Constructor Details

    • ObservationPropagationChannelInterceptor

      public ObservationPropagationChannelInterceptor(io.micrometer.observation.ObservationRegistry observationRegistry)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details