Module: Appsignal::Integrations::HanamiPlugin

Defined in:
lib/appsignal/integrations/hanami.rb

Class Method Summary collapse

Class Method Details

.initObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/appsignal/integrations/hanami.rb', line 8

def self.init
  Appsignal.logger.debug("Loading Hanami integration")

  hanami_app_config = ::Hanami.app.config
  Appsignal.config = Appsignal::Config.new(
    hanami_app_config.root || Dir.pwd,
    hanami_app_config.env
  )

  Appsignal.start_logger
  Appsignal.start

  ::Hanami::Action.send(:prepend, Appsignal::Integrations::HanamiIntegration) if Appsignal.active?
end