Sha256: a6c4a25fcc15e4eb74ff4c1f44c2ea538716b2e8ad858910a2942992fcae3426

Contents?: true

Size: 1.14 KB

Versions: 29

Compression:

Stored size: 1.14 KB

Contents

# encoding: utf-8
# This file is distributed under New Relic's license terms.
# See https://github.com/newrelic/rpm/blob/master/LICENSE for complete details.

# This is the initialization for the New Relic Ruby Agent when used as
# a plugin
require 'new_relic/control'

# If you are having problems seeing data, be sure and check the
# newrelic_agent.log files in the log diretory of your application
#
# If you can't find any log files and you don't see anything in your
# application log files, try uncommenting the two lines at the
# bottom of this file to verify the plugin is being loaded,
# then send the output to support@newrelic.com if you are unable to
# resolve the issue.

# Initializer for the NewRelic Ruby Agent

# After verison 2.0 of Rails we can access the configuration directly.
# We need it to add dev mode routes after initialization finished.

begin

  current_config = if defined?(config)
    config
  elsif defined?(Rails.configuration)
    Rails.configuration
  end

  NewRelic::Control.instance.init_plugin :config => current_config

rescue => e
  ::NewRelic::Agent.logger.error "Error initializing New Relic plugin. Agent is disabled.", e
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
newrelic_rpm-3.7.1.188 init.rb
newrelic_rpm-3.7.1.182 init.rb
newrelic_rpm-3.7.1.180 init.rb
newrelic_rpm-3.7.0.177 init.rb
newrelic_rpm-3.7.0.174.beta init.rb
newrelic_rpm-3.6.9.171 init.rb
newrelic_rpm-3.6.8.168 init.rb
newrelic_rpm-3.6.8.164 init.rb
newrelic_rpm-3.6.7.159 init.rb
newrelic_rpm-3.6.7.159.beta init.rb
newrelic_rpm-3.6.7.152 init.rb
newrelic_rpm-3.6.6.147 init.rb
newrelic_rpm-3.6.5.130 init.rb
newrelic_rpm-3.6.4.122 init.rb
newrelic_rpm-3.6.4.113.beta init.rb
newrelic_rpm-3.6.3.111 init.rb
newrelic_rpm-3.6.3.106 init.rb
newrelic_rpm-3.6.3.105.beta init.rb
newrelic_rpm-3.6.3.104 init.rb
newrelic_rpm-3.6.3.103.beta init.rb