Skip to content

Conversation

@jeffkreeftmeijer
Copy link
Member

No description provided.

Monkey patch the `ActiveSupport::Notifications` `NullHandle` so that we
get events reported again.

The `NullHandle` is used when no subscribers are registered. That means
we get no events reported when there are no subscribers.
We're not a subscriber because of a performance problem in PR #150 we
decided instead to monkey patch it.

See issue #1471

## To do

- This requires unit tests.
- This requires testing in a real world Rails 8.1 app.
@jeffkreeftmeijer jeffkreeftmeijer self-assigned this Oct 23, 2025
@jeffkreeftmeijer jeffkreeftmeijer added the bug Confirmed and unconfirmed bugs reported by us and customers. label Oct 23, 2025
@backlog-helper
Copy link

Hi @jeffkreeftmeijer,

We've found some issues with your Pull Request.

  • This Pull Request is missing a description. Please describe the problem so other people understand the Pull Request as well. - (More info)

New issue guide | Backlog management | Rules | Feedback

With ActiveSupport::Notifications::Fanout::NullHandle now existing, we
have a state where ActiveSupport::Notifications::Fanout::Handle
exists, but the start_finish_shared_examples will fail because the
NullHandleAwareInstrumentIntegration uses the #instrument integration
we use when Fanout::Handle doesn't exist.

Therefor, when Fanout::NullHandle exists, we can rely on the main
tests and don't have to include the start_finish ones.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Confirmed and unconfirmed bugs reported by us and customers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants