Class: Appsignal::Hooks Private

Inherits:
Object show all
Defined in:
lib/appsignal/hooks.rb,
lib/appsignal/hooks/gvl.rb,
lib/appsignal/hooks/mri.rb,
lib/appsignal/hooks/que.rb,
lib/appsignal/hooks/http.rb,
lib/appsignal/hooks/puma.rb,
lib/appsignal/hooks/rake.rb,
lib/appsignal/hooks/excon.rb,
lib/appsignal/hooks/redis.rb,
lib/appsignal/hooks/resque.rb,
lib/appsignal/hooks/sequel.rb,
lib/appsignal/hooks/sidekiq.rb,
lib/appsignal/hooks/unicorn.rb,
lib/appsignal/hooks/net_http.rb,
lib/appsignal/hooks/celluloid.rb,
lib/appsignal/hooks/passenger.rb,
lib/appsignal/hooks/shoryuken.rb,
lib/appsignal/hooks/active_job.rb,
lib/appsignal/hooks/webmachine.rb,
lib/appsignal/hooks/data_mapper.rb,
lib/appsignal/hooks/delayed_job.rb,
lib/appsignal/hooks/action_cable.rb,
lib/appsignal/hooks/action_mailer.rb,
lib/appsignal/hooks/mongo_ruby_driver.rb,
lib/appsignal/integrations/data_mapper.rb,
lib/appsignal/integrations/mongo_ruby_driver.rb,
lib/appsignal/integrations/delayed_job_plugin.rb,
lib/appsignal/hooks/active_support_notifications.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Defined Under Namespace

Modules: DataMapperLogListener, Helpers, SequelLogConnectionExtension, SequelLogExtension Classes: ActionCableHook, ActionMailerHook, ActiveJobHook, ActiveSupportNotificationsHook, CelluloidHook, DataMapperHook, DelayedJobHook, DelayedJobPlugin, ExconHook, GvlHook, Hook, HttpHook, MongoMonitorSubscriber, MongoRubyDriverHook, MriHook, NetHttpHook, PassengerHook, PumaHook, QueHook, RakeHook, RedisHook, ResqueHook, SequelHook, ShoryukenHook, ShoryukenMiddleware, SidekiqHook, UnicornHook, WebmachineHook

Class Method Summary collapse

Class Method Details

.const_missing(name) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Alias integration constants that have moved to their own module.



74
75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/appsignal/hooks.rb', line 74

def self.const_missing(name)
  case name
  when :SidekiqPlugin
    require "appsignal/integrations/sidekiq"
    callers = caller
    Appsignal::Utils::DeprecationMessage.message \
      "The constant Appsignal::Hooks::SidekiqPlugin has been deprecated. " \
      "Please update the constant name to Appsignal::Integrations::SidekiqMiddleware " \
      "in the following file to remove this message.\n#{callers.first}"
    Appsignal::Integrations::SidekiqMiddleware
  else
    super
  end
end

.hooksObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



17
18
19
# File 'lib/appsignal/hooks.rb', line 17

def hooks
  @hooks ||= {}
end

.load_hooksObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



11
12
13
14
15
# File 'lib/appsignal/hooks.rb', line 11

def load_hooks
  hooks.each do |name, hook|
    hook.try_to_install(name)
  end
end

.register(name, hook) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



7
8
9
# File 'lib/appsignal/hooks.rb', line 7

def register(name, hook)
  hooks[name] = hook
end