Class: Appsignal::Loaders::PadrinoLoader Private

Inherits:
Loader show all
Defined in:
lib/appsignal/loaders/padrino.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: PadrinoIntegration

Instance Method Summary collapse

Methods inherited from Loader

register, #register_config_defaults

Instance Method Details

#on_loadObject

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.



8
9
10
11
12
13
# File 'lib/appsignal/loaders/padrino.rb', line 8

def on_load
  register_config_defaults(
    :root_path => Padrino.mounted_root,
    :env => Padrino.env
  )
end

#on_startObject

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.



15
16
17
18
19
20
21
22
23
24
25
# File 'lib/appsignal/loaders/padrino.rb', line 15

def on_start
  require "appsignal/rack/sinatra_instrumentation"

  Padrino::Application.prepend(Appsignal::Loaders::PadrinoLoader::PadrinoIntegration)

  Padrino.before_load do
    Padrino.use ::Rack::Events, [Appsignal::Rack::EventHandler.new]
    Padrino.use Appsignal::Rack::SinatraBaseInstrumentation,
      :instrument_event_name => "process_action.padrino"
  end
end