Sha256: 7cabf97dda97cf7f28b48630b3144a3ae8fcf70a82de544a033e41de6c741626

Contents?: true

Size: 1.02 KB

Versions: 13

Compression:

Stored size: 1.02 KB

Contents

# This file is distributed under New Relic's license terms.
# See https://github.com/newrelic/newrelic-ruby-agent/blob/main/LICENSE for complete details.
# frozen_string_literal: true

# 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 directory of your application
#
# If you can't find any log files and you don't see anything in your
# application log files please visit support.newrelic.com.

# Initializer for the New Relic Ruby agent

# After version 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

13 entries across 13 versions & 1 rubygems

Version Path
newrelic_rpm-9.16.0 init.rb
newrelic_rpm-9.15.0 init.rb
newrelic_rpm-9.14.0 init.rb
newrelic_rpm-9.13.0 init.rb
newrelic_rpm-9.12.0 init.rb
newrelic_rpm-9.11.0 init.rb
newrelic_rpm-9.10.2 init.rb
newrelic_rpm-9.10.1 init.rb
newrelic_rpm-9.10.0 init.rb
newrelic_rpm-9.9.0 init.rb
newrelic_rpm-9.8.0 init.rb
newrelic_rpm-9.7.1 init.rb
newrelic_rpm-9.7.0 init.rb