Class: Appsignal::Rack::SinatraInstrumentation Private

Inherits:
Object
  • Object
show all
Defined in:
lib/appsignal/rack/sinatra_instrumentation.rb

Overview

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.

Stub old middleware. Prevents Sinatra middleware being loaded twice. This can happen when users use the old method of including ‘use Appsignal::Rack::SinatraInstrumentation` in their modular Sinatra applications. This is no longer needed. Instead Appsignal now includes `use Appsignal::Rack::SinatraBaseInstrumentation` automatically.

Instance Method Summary collapse

Constructor Details

#initialize(app, options = {}) ⇒ SinatraInstrumentation

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.

Returns a new instance of SinatraInstrumentation.



13
14
15
16
17
18
# File 'lib/appsignal/rack/sinatra_instrumentation.rb', line 13

def initialize(app, options = {})
  @app = app
  @options = options
  Appsignal.internal_logger.warn "Please remove Appsignal::Rack::SinatraInstrumentation " \
    "from your Sinatra::Base class. This is no longer needed."
end

Instance Method Details

#call(env) ⇒ 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.



20
21
22
# File 'lib/appsignal/rack/sinatra_instrumentation.rb', line 20

def call(env)
  @app.call(env)
end

#settingsObject

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.



24
25
26
# File 'lib/appsignal/rack/sinatra_instrumentation.rb', line 24

def settings
  @app.settings
end