Sha256: 6af32f7994af4ba713ac2c91ab3d894cb17190bf3a1e08184e4f4d3a110ad74a

Contents?: true

Size: 1.36 KB

Versions: 65

Compression:

Stored size: 1.36 KB

Contents

# == New Relic Initialization
#
# When installed as a gem, you can activate the New Relic agent one of the following ways:
#
# For Rails, add:
#    config.gem 'newrelic_rpm'
# to your initialization sequence.
#
# For merb, do
#    dependency 'newrelic_rpm'
# in the Merb config/init.rb
#
# For Sinatra, do
#    require 'newrelic_rpm'
# after requiring 'sinatra'.
#
# For other frameworks, or to manage the agent manually, invoke NewRelic::Agent#manual_start
# directly.
#
require 'new_relic/control'
if defined?(Merb) && defined?(Merb::BootLoader)
  module NewRelic
    class MerbBootLoader < Merb::BootLoader
      after Merb::BootLoader::ChooseAdapter
      def self.run
        NewRelic::Control.instance.init_plugin
      end
    end
  end
elsif defined? Rails
  if Rails.respond_to?(:version) && Rails.version =~ /^3/
    module NewRelic
      class Railtie < Rails::Railtie

        initializer "newrelic_rpm.start_plugin" do |app|
	  NewRelic::Control.instance.init_plugin(:config => app.config)
        end
      end
    end
  else
    # After verison 2.0 of Rails we can access the configuration directly.
    # We need it to add dev mode routes after initialization finished.
    config = nil
    config = Rails.configuration if Rails.respond_to?(:configuration)
    NewRelic::Control.instance.init_plugin :config => config
  end
else
  NewRelic::Control.instance.init_plugin
end

Version data entries

65 entries across 65 versions & 4 rubygems

Version Path
newrelic_rpm-3.5.4.35.beta lib/newrelic_rpm.rb
newrelic_rpm-3.5.4.34 lib/newrelic_rpm.rb
newrelic_rpm-3.5.4.33 lib/newrelic_rpm.rb
newrelic_rpm-3.5.4.31.beta lib/newrelic_rpm.rb
newrelic_rpm-3.5.4.29.beta lib/newrelic_rpm.rb
ghazel-newrelic_rpm-3.5.4 lib/newrelic_rpm.rb
newrelic_rpm-3.5.3.25 lib/newrelic_rpm.rb
newrelic_rpm-3.5.3.24 lib/newrelic_rpm.rb
newrelic_rpm-3.5.2.17 lib/newrelic_rpm.rb
newrelic_rpm-3.5.1.14 lib/newrelic_rpm.rb
newrelic_rpm-3.5.1.14.beta lib/newrelic_rpm.rb
newrelic_rpm-3.5.1.beta1 lib/newrelic_rpm.rb
newrelic_rpm-3.5.0.1 lib/newrelic_rpm.rb
newrelic_rpm-3.5.1.alpha lib/newrelic_rpm.rb
newrelic_rpm-3.5.0 lib/newrelic_rpm.rb
newrelic_rpm-3.4.2.1 lib/newrelic_rpm.rb
newrelic_rpm-3.4.2 lib/newrelic_rpm.rb
newrelic_rpm-3.4.2.beta1 lib/newrelic_rpm.rb
newrelic_rpm-3.4.1 lib/newrelic_rpm.rb
newrelic_rpm-3.4.1.beta1 lib/newrelic_rpm.rb