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

Expose RabbitBinderConfigurationProperties.enableObservation property similar to the one in KafkaBinderConfigurationProperties #2902

Open
artembilan opened this issue Feb 14, 2024 · 0 comments

Comments

@artembilan
Copy link
Contributor

Right now we do enable observation in RabbitMQ Binder endpoints unconditionally when an ObservationRegistry bean in present in the application context.
For consistency it is better to leave the choice up to end-user independently of the environment.
See TODO in the RabbitMessageChannelBinder.

@artembilan artembilan added this to the 4.2 milestone Feb 14, 2024
artembilan added a commit to artembilan/spring-cloud-stream that referenced this issue Feb 14, 2024
The observation propagation doesn't work in multi-binder configuration

* Remove `ObservationAutoConfiguration` since it is not visible in case of multi-binder configuration
* Instead move `setObservationEnabled` flag setting to the `RabbitMessageChannelBinder`
* Add `io.micrometer.observation.ObservationRegistry` into `shared.beans` to make it visible for binder-specific application context
* Add `RabbitMultiBinderObservationTests` integration test where Rabbit Binder is in multi-binder environment

As a side effect this fixes an observation propagation for Kafka binder as well in the multi-binder environment.
Its configuration is OK, but an `ObservationRegistry` must make it visible for the binder-specific application context.
See the mentioned `shared.beans`

Related to spring-cloud#2901
Also see spring-cloud#2902 for possible evolution
artembilan added a commit to artembilan/spring-cloud-stream that referenced this issue Feb 14, 2024
The observation propagation doesn't work in multi-binder configuration

* Remove `ObservationAutoConfiguration` since it is not visible in case of multi-binder configuration
* Instead move `setObservationEnabled` flag setting to the `RabbitMessageChannelBinder`
* Add `io.micrometer.observation.ObservationRegistry` into `shared.beans` to make it visible for binder-specific application context
* Add `RabbitMultiBinderObservationTests` integration test where Rabbit Binder is in multi-binder environment

As a side effect this fixes an observation propagation for Kafka binder as well in the multi-binder environment.
Its configuration is OK, but an `ObservationRegistry` must make it visible for the binder-specific application context.
See the mentioned `shared.beans`

Related to spring-cloud#2901
Also see spring-cloud#2902 for possible evolution
artembilan added a commit to artembilan/spring-cloud-stream that referenced this issue Feb 14, 2024
The observation propagation doesn't work in multi-binder configuration

* Remove `ObservationAutoConfiguration` since it is not visible in case of multi-binder configuration
* Instead move `setObservationEnabled` flag setting to the `RabbitMessageChannelBinder`
* Add `io.micrometer.observation.ObservationRegistry` into `shared.beans` to make it visible for binder-specific application context
* Add `RabbitMultiBinderObservationTests` integration test where Rabbit Binder is in multi-binder environment

As a side effect this fixes an observation propagation for Kafka binder as well in the multi-binder environment.
Its configuration is OK, but an `ObservationRegistry` must make it visible for the binder-specific application context.
See the mentioned `shared.beans`

Related to spring-cloud#2901
Also see spring-cloud#2902 for possible evolution
sobychacko pushed a commit that referenced this issue Feb 14, 2024
Fixes: #2901 

* Rework an observation for Rabbit Binder

The observation propagation doesn't work in multi-binder configuration

* Remove `ObservationAutoConfiguration` since it is not visible in case of multi-binder configuration
* Instead move `setObservationEnabled` flag setting to the `RabbitMessageChannelBinder`
* Add `io.micrometer.observation.ObservationRegistry` into `shared.beans` to make it visible for binder-specific application context
* Add `RabbitMultiBinderObservationTests` integration test where Rabbit Binder is in a multi-binder environment

As a side effect, this fixes an observation propagation for the Kafka binder as well in the multi-binder environment.
Its configuration is OK, but an `ObservationRegistry` must make it visible for the binder-specific application context.
See the mentioned `shared. beans`

Related to #2901
Also see #2902 for possible evolution

* Update the copyright of the affected classes
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

1 participant