Class: NewRelic::Control

Inherits:
Object
  • Object
show all
Extended by:
ClassMethods
Includes:
InstanceMethods, Instrumentation, ServerMethods
Defined in:
lib/new_relic/control.rb,
lib/new_relic/control/frameworks.rb,
lib/new_relic/control/class_methods.rb,
lib/new_relic/control/server_methods.rb,
lib/new_relic/control/frameworks/roda.rb,
lib/new_relic/control/frameworks/ruby.rb,
lib/new_relic/control/instrumentation.rb,
lib/new_relic/control/frameworks/rails.rb,
lib/new_relic/control/instance_methods.rb,
lib/new_relic/control/frameworks/rails3.rb,
lib/new_relic/control/frameworks/rails4.rb,
lib/new_relic/control/frameworks/sinatra.rb,
lib/new_relic/control/frameworks/external.rb,
lib/new_relic/control/private_instance_methods.rb,
lib/new_relic/control/frameworks/rails_notifications.rb

Overview

The Control is a singleton responsible for the startup and initialization sequence. The initializer uses a LocalEnvironment to detect the framework and instantiates the framework specific subclass.

The Control also implements some of the public API for the agent.

Direct Known Subclasses

Frameworks::Ruby

Defined Under Namespace

Modules: ClassMethods, Frameworks, InstanceMethods, Instrumentation, PrivateInstanceMethods, ServerMethods Classes: Server

Instance Attribute Summary

Attributes included from InstanceMethods

#env, #local_env

Instance Method Summary collapse

Methods included from ClassMethods

instance, load_framework_class, load_test_framework, local_env, new_instance, newrelic_root, reset

Methods included from InstanceMethods

#[], #app, #configure_agent, #determine_env, #dispatcher, #framework, #handle_invalid_security_settings, #init_plugin, #newrelic_root, #security_settings_valid?, #settings, #start_agent

Methods included from Instrumentation

#add_instrumentation, #install_instrumentation, #install_shim, #load_instrumentation_files

Methods included from ServerMethods

#api_server, #server, #server_from_host

Instance Method Details

#rails_32_deprecationObject



70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/new_relic/control/instrumentation.rb', line 70

def rails_32_deprecation
  return unless defined?(Rails::VERSION) && Gem::Version.new(Rails::VERSION::STRING) <= Gem::Version.new('3.2')

  deprecation_msg = 'The Ruby agent is dropping support for Rails 3.2 ' \
    'in a future major release. Please upgrade your Rails version to continue receiving support. ' \

  Agent.logger.log_once(
    :warn,
    :deprecated_rails_version,
    deprecation_msg
  )
end