Class: Appsignal::Loaders::SinatraLoader Private
- Defined in:
- lib/appsignal/loaders/sinatra.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.
Instance Method Summary collapse
- #on_load ⇒ Object private
- #on_start ⇒ Object private
Methods inherited from Loader
register, #register_config_defaults
Instance Method Details
#on_load ⇒ 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.
8 9 10 11 12 13 14 |
# File 'lib/appsignal/loaders/sinatra.rb', line 8 def on_load app_settings = ::Sinatra::Application.settings register_config_defaults( :root_path => app_settings.root, :env => app_settings.environment ) end |
#on_start ⇒ 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.
16 17 18 19 20 21 |
# File 'lib/appsignal/loaders/sinatra.rb', line 16 def on_start require "appsignal/rack/sinatra_instrumentation" ::Sinatra::Base.use(::Rack::Events, [Appsignal::Rack::EventHandler.new]) ::Sinatra::Base.use(Appsignal::Rack::SinatraBaseInstrumentation) end |