Sha256: ee5fc91002a79d65923969e32b9d81180296582335bdb2fad123b673a6599a6a

Contents?: true

Size: 608 Bytes

Versions: 9

Compression:

Stored size: 608 Bytes

Contents

require "instana/rack"

if defined?(::Rails)
  # In Rails, let's use the Rails logger
  ::Instana.logger = ::Rails.logger if ::Rails.logger

  if ::Rails::VERSION::MAJOR < 3
    ::Rails.configuration.after_initialization do
      ::Instana.logger.warn "Instrumenting Rack"
      ::Rails.configuration.middleware.insert 0, ::Instana::Rack
    end
  else
    module ::Instana
      class Railtie < ::Rails::Railtie
        initializer 'instana.rack' do |app|
          ::Instana.logger.warn "Instrumenting Rack"
          app.config.middleware.insert 0, ::Instana::Rack
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
instana-1.1.0 lib/instana/frameworks/rails.rb
instana-1.0.3 lib/instana/frameworks/rails.rb
instana-1.0.2 lib/instana/frameworks/rails.rb
instana-1.0.1 lib/instana/frameworks/rails.rb
instana-0.15.0 lib/instana/frameworks/rails.rb
instana-0.14.2 lib/instana/frameworks/rails.rb
instana-0.14.0 lib/instana/frameworks/rails.rb
instana-0.13.1 lib/instana/frameworks/rails.rb
instana-0.12.1 lib/instana/frameworks/rails.rb