Skip to content

Switch to ActiveSupport::Notifications.monotonic_subscribe#856

Merged
SB-khushbum merged 3 commits into
nextfrom
khushbu/PLAT-13040-switch_to_monotonic_subscribe
Apr 13, 2026
Merged

Switch to ActiveSupport::Notifications.monotonic_subscribe#856
SB-khushbum merged 3 commits into
nextfrom
khushbu/PLAT-13040-switch_to_monotonic_subscribe

Conversation

@SB-khushbum
Copy link
Copy Markdown
Contributor

@SB-khushbum SB-khushbum commented Apr 9, 2026

Goal

Add ActiveSupport::Notifications.monotonic_subscribe for performance improvement. monotonic_subscribe was introduced in Rails 6.1+, so add a condition to use it only when available.

Testing

  • Verified locally with all supported Rails versions and Ruby versions.
  • Ran RSpec and maze-runner test suites; all passed.
  • Confirmed that event subscription and breadcrumbs work as expected in all environments.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds support for Rails’ ActiveSupport::Notifications.monotonic_subscribe (when available) to improve notification subscription performance while maintaining compatibility with older Rails versions.

Changes:

  • Conditionally select monotonic_subscribe vs subscribe when registering Rails breadcrumb event subscriptions.
  • Document the enhancement in the changelog under “TBD”.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
lib/bugsnag/integrations/railtie.rb Switches event subscription to use monotonic_subscribe when supported, falling back to subscribe.
CHANGELOG.md Notes the enhancement for the upcoming release.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/bugsnag/integrations/railtie.rb
Copy link
Copy Markdown

@SB-jigneshR SB-jigneshR left a comment

Choose a reason for hiding this comment

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

Do the needful changes.

Comment thread CHANGELOG.md Outdated
@SB-khushbum SB-khushbum marked this pull request as ready for review April 13, 2026 09:51
@twometresteve
Copy link
Copy Markdown
Contributor

This looks fine to me given the testing detailed. No comments to make.

@SB-khushbum SB-khushbum merged commit 9228230 into next Apr 13, 2026
162 checks passed
@SB-khushbum SB-khushbum deleted the khushbu/PLAT-13040-switch_to_monotonic_subscribe branch April 13, 2026 10:12
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.

5 participants