module Sentry::Rails::ActionCableExtensions::Channel::Subscriptions
def self.included(base)
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
def sentry_capture(hook, &block)
def sentry_capture(hook, &block) extra_context = { params: params } ErrorHandler.capture(connection, transaction_name: "#{self.class.name}##{hook}", extra_context: extra_context, &block) end