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

"observationEnabled" defaults to TRUE #1549

Open
cero-t opened this issue Jan 9, 2023 · 6 comments
Open

"observationEnabled" defaults to TRUE #1549

cero-t opened this issue Jan 9, 2023 · 6 comments

Comments

@cero-t
Copy link

cero-t commented Jan 9, 2023

Expected Behavior

I want the auto-configuration to set the observationEnabled parameter of RabbitTemplate and AbstractRabbitListenerContainerFactory 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 to false.

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.

@garyrussell
Copy link
Contributor

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.

@artembilan
Copy link
Member

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

@garyrussell
Copy link
Contributor

It could be done there, yes; but, again, I would not want it to default to true.

@artembilan
Copy link
Member

Right, false by default, but still easy to configure by convention instead of some customizers and so on.

@cero-t
Copy link
Author

cero-t commented Jan 10, 2023

Thank you, I understand the design.
I hope it can be set by an environment or auto-configuration property.

@garyrussell
Copy link
Contributor

You could open a request against Boot, but I don't know if the Boot team will add new properties in patch releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants