newrelic-ruby-agent
newrelic-ruby-agent copied to clipboard
Remove Rails version < 2.0 specific logic from NewRelic::Control::Frameworks::Rails
The NewRelic::Control::Frameworks::Rails class's init_config method accepts an options hash as a parameter. The value corresponding to the :config key in that hash is then used to set a @config instance variable. In that same class's rails_config method, this @config variable is not getting used by anything now that we require Rails 3.2+.
This baton pass of the Rails app config to the init_config method (which does not require a parameter to be passed in) is not only unnecessary with Rails 3.2+ (see source code comments for init_config), but having it also runs the risk of being very confusing when init_plugin takes in a :config key/value pair set equal to the Rails app's config. Given that "init_plugin" suggests the "initialization of the Ruby agent as a plugin", it is entirely reasonable that the "config" parameter will be thought of as the agent's own configuration.
See #1050 for more details on the baton passes and the confusion they cause.
https://issues.newrelic.com/browse/NEWRELIC-3442