Module: Sentry::Rails::ActionCableExtensions::Channel::Subscriptions

Defined in:
lib/sentry/rails/action_cable.rb

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



77
78
79
80
81
82
# File 'lib/sentry/rails/action_cable.rb', line 77

def self.included(base)
  base.class_eval do
    set_callback :subscribe, :around, ->(_, block) { sentry_capture(:subscribed, &block) }, prepend: true
    set_callback :unsubscribe, :around, ->(_, block) { sentry_capture(:unsubscribed, &block) }, prepend: true
  end
end