diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f7cbbddb7..e98e26d466 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,14 @@ The agent now supports Ruby 3.4.0. We've made incremental changes throughout the preview stage to reach compatibility. This release includes an update to the Thread Profiler for compatibility with Ruby 3.4.0's new backtrace format. [Issue#2992](https://github.com/newrelic/newrelic-ruby-agent/issues/2992) [PR#2997](https://github.com/newrelic/newrelic-ruby-agent/pull/2997) +- **Bugfix: Stop emitting inaccurate debug-level log about deprecated configuration options** + + During our last major version release, we dropped support for a number of configuration options for instrumentation that uses alias method chaining or module prepending and began with `disable_`. The remaining configuration option had the format `instrumentation.`, with options to allow users to select their preferred patching approach. There was a deprecation message emitted at the DEBUG level of the agent logs when any configuration option with `disable_*` was `true`. For example: + + >DEBUG : [DEPRECATED] configuration disable_ for will be removed in the next major release. Use instrumentation. with one of ["auto", "disabled", "prepend", "chain"] + + However, this could emit warnings for configuration options without an equivalent `instrumentation.*` option, such as Action Dispatch. This inaccurate warning is now removed. If you are disabling instrumentation using `instrumentation.: disabled` or `NEW_RELIC_INSTRUMENTATION_=disabled`, please verify the option exists by consulting our [configuration documentation](https://docs.newrelic.com/docs/apm/agents/ruby-agent/configuration/ruby-agent-configuration/#instrumentation). If the option does not exist, check the ['Disabling' section](https://docs.newrelic.com/docs/apm/agents/ruby-agent/configuration/ruby-agent-configuration/#disabling) to see if there is a related option. We apologize for the confusion. [PR#3005](https://github.com/newrelic/newrelic-ruby-agent/pull/3005) + - **Bugfix: Do not attempt to decorate logs with `nil` messages** The agent no longer attempts to add New Relic linking metadata to logs with `nil` messages. Thank you, [@arlando](https://github.com/arlando) for bringing this to our attention! [Issue#2985](https://github.com/newrelic/newrelic-ruby-agent/issues/2985) [PR#2986](https://github.com/newrelic/newrelic-ruby-agent/pull/2986) diff --git a/lib/new_relic/agent/configuration/default_source.rb b/lib/new_relic/agent/configuration/default_source.rb index efc3ecc21b..b379719c62 100644 --- a/lib/new_relic/agent/configuration/default_source.rb +++ b/lib/new_relic/agent/configuration/default_source.rb @@ -1310,6 +1310,7 @@ def self.notify :default => false, :public => true, :type => Boolean, + :aliases => %i[disable_active_job], :allowed_from_server => false, :description => 'If `true`, disables Active Job instrumentation.' }, diff --git a/lib/new_relic/dependency_detection.rb b/lib/new_relic/dependency_detection.rb index d9c7dff358..9069d5c70a 100644 --- a/lib/new_relic/dependency_detection.rb +++ b/lib/new_relic/dependency_detection.rb @@ -144,8 +144,6 @@ def allowed_by_config? !(disabled_configured? || deprecated_disabled_configured?) end - # TODO: MAJOR VERSION - # will only return true if a disabled key is found and is truthy def deprecated_disabled_configured? return false if self.name.nil? @@ -153,12 +151,7 @@ def deprecated_disabled_configured? return false unless ::NewRelic::Agent.config[key] == true ::NewRelic::Agent.logger.debug("Not installing #{self.name} instrumentation because of configuration #{key}") - ::NewRelic::Agent.logger.debug( \ - "[DEPRECATED] configuration #{key} for #{self.name} will be removed in the next major release. " \ - "Use `#{config_key}` with one of `#{VALID_CONFIG_VALUES.map(&:to_s).inspect}`" - ) - - return true + true end def config_key diff --git a/test/new_relic/dependency_detection_test.rb b/test/new_relic/dependency_detection_test.rb index d60a0cbadc..3354c18dda 100644 --- a/test/new_relic/dependency_detection_test.rb +++ b/test/new_relic/dependency_detection_test.rb @@ -146,7 +146,6 @@ def test_config_disabling_with_disabled DependencyDetection.detect! assert_predicate dd, :disabled_configured? - refute_predicate dd, :deprecated_disabled_configured? refute_predicate dd, :allowed_by_config? refute executed end @@ -165,7 +164,6 @@ def test_config_disabling_with_enabled DependencyDetection.detect! refute_predicate dd, :disabled_configured? - refute_predicate dd, :deprecated_disabled_configured? assert_predicate dd, :allowed_by_config? assert executed end @@ -185,7 +183,6 @@ def test_config_disabling_with_disable_testing DependencyDetection.detect! refute_predicate dd, :disabled_configured? - assert_predicate dd, :deprecated_disabled_configured? refute_predicate dd, :allowed_by_config? refute executed end @@ -204,7 +201,6 @@ def test_config_enabling_with_enabled DependencyDetection.detect! refute_predicate dd, :disabled_configured? - refute_predicate dd, :deprecated_disabled_configured? assert executed assert_predicate dd, :use_prepend? end @@ -220,7 +216,6 @@ def test_config_enabling_with_auto DependencyDetection.detect! refute_predicate dd, :disabled_configured? - refute_predicate dd, :deprecated_disabled_configured? assert_predicate dd, :use_prepend? end end @@ -235,7 +230,6 @@ def test_config_enabling_with_prepend DependencyDetection.detect! refute_predicate dd, :disabled_configured? - refute_predicate dd, :deprecated_disabled_configured? assert_predicate dd, :use_prepend? end end @@ -250,7 +244,6 @@ def test_config_enabling_with_chain DependencyDetection.detect! refute_predicate dd, :disabled_configured? - refute_predicate dd, :deprecated_disabled_configured? refute_predicate dd, :use_prepend? end end