class Instana::Activators::ActionCable

Public Instance Methods

can_instrument?() click to toggle source
# File lib/instana/activators/action_cable.rb, line 7
def can_instrument?
  defined?(::ActionCable::Connection::Base) && defined?(::ActionCable::Channel::Base)
end
instrument() click to toggle source
# File lib/instana/activators/action_cable.rb, line 11
def instrument
  require 'instana/instrumentation/action_cable'

  ::ActionCable::Connection::Base
    .prepend(Instana::Instrumentation::ActionCableConnection)

  ::ActionCable::Channel::Base
    .prepend(Instana::Instrumentation::ActionCableChannel)

  true
end