Open cero-t opened 1 year ago
It is false by default by design; adding observation is quite expensive, especially for those who only want metrics (and not tracing). When observation is not enabled, we maintain Micrometer timers outside of observation, avoiding its overhead.
We could consider setting it based on an environment property, but we cannot set it to true
by default.
Don't we need to expose such an auto-configuration property, @garyrussell , in Spring Boot?
RabbitProperties.Template
and RabbitProperties.Listener
.
For Spring Integration I did via spring.integration.management.observationPatterns
It could be done there, yes; but, again, I would not want it to default to true
.
Right, false
by default, but still easy to configure by convention instead of some customizers and so on.
Thank you, I understand the design. I hope it can be set by an environment or auto-configuration property.
You could open a request against Boot, but I don't know if the Boot team will add new properties in patch releases.
Expected Behavior
I want the auto-configuration to set the
observationEnabled
parameter ofRabbitTemplate
andAbstractRabbitListenerContainerFactory
to true by default.Current Behavior
Micrometer Tracing does not work out of the box because the default value of their
observationEnabled
are now set tofalse
.Context
Spring Boot 3.0 provides auto-configuration for Micrometer Tracing, and it works out of the box with Spring Web and Spring Cloud Stream, but it doesn't work with Spring AMQP. I found Spring Cloud Stream (binder-rabbitmq) sets it
true
. I think Spring AMQP should also be friendly towards Micrometer Tracing.