Skip to content

Conversation

artembilan
Copy link
Member

Fixes: #10379

The ObservationRegistry.NOOP still brings some performance overhead.

  • Fix MessageProducerSupport & SourcePollingChannelAdapter to check for isObserved() before using the IntegrationObservation

Auto-cherry-pick to 6.5.x & 6.4.x

Fixes: spring-projects#10379

The `ObservationRegistry.NOOP` still brings some performance overhead.

* Fix `MessageProducerSupport` & `SourcePollingChannelAdapter` to check for `isObserved()`
before using the `IntegrationObservation`

**Auto-cherry-pick to `6.5.x` & `6.4.x`**
@artembilan artembilan requested a review from cppwfs September 3, 2025 20:58
Copy link
Contributor

@cppwfs cppwfs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Great optimization!

@cppwfs cppwfs merged commit 36559ca into spring-projects:main Sep 4, 2025
3 checks passed
spring-builds pushed a commit that referenced this pull request Sep 4, 2025
Fixes: #10379

The `ObservationRegistry.NOOP` still brings some performance overhead.

* Fix `MessageProducerSupport` & `SourcePollingChannelAdapter` to check for `isObserved()`
before using the `IntegrationObservation`

(cherry picked from commit 36559ca)
@artembilan artembilan deleted the GH-10379 branch September 4, 2025 12:16
cppwfs pushed a commit that referenced this pull request Sep 4, 2025
Fixes: #10379

The `ObservationRegistry.NOOP` still brings some performance overhead.

* Fix `MessageProducerSupport` & `SourcePollingChannelAdapter` to check for `isObserved()`
before using the `IntegrationObservation`

**Auto-cherry-pick to `6.5.x` & `6.4.x`**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bypass observation in MessageProducerSupport when NOOP registry is configured
2 participants