Micrometer Observation

Using Micrometer for observation is now supported, since version 3.0, for the RabbitTemplate and listener containers.spring-doc.cn

Set observationEnabled on each component to enable observation; this will disable Micrometer Timers because the timers will now be managed with each observation. When using annotated listeners, set observationEnabled on the container factory.spring-doc.cn

Refer to Micrometer Tracing for more information.spring-doc.cn

To add tags to timers/traces, configure a custom RabbitTemplateObservationConvention or RabbitListenerObservationConvention to the template or listener container, respectively.spring-doc.cn

The default implementations add the name tag for template observations and listener.id tag for containers.spring-doc.cn

You can either subclass DefaultRabbitTemplateObservationConvention or DefaultRabbitListenerObservationConvention or provide completely new implementations.spring-doc.cn

Due to ambiguity in how traces should be handled in a batch, observations are NOT created for Batch Listener Containers.