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

Rework an observation for Rabbit Binder #2903

Merged
merged 2 commits into from
Feb 14, 2024

Conversation

artembilan
Copy link
Contributor

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 #2901 Also see #2902 for possible evolution

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
Copy link
Contributor

@artembilan Looks good. One small comment - some classes are missing copyright updates to 2024 and your author tag.

@sobychacko sobychacko merged commit 3e24d33 into spring-cloud:main Feb 14, 2024
1 check passed
@sobychacko sobychacko added this to the 4.1.1 milestone Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants