Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove outdated deprecation message about disabled_* config options #3005

Merged
merged 3 commits into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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_<library_name>`. The remaining configuration option had the format `instrumentation.<library_name>`, 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:
kaylareopelle marked this conversation as resolved.
Show resolved Hide resolved

>DEBUG : [DEPRECATED] configuration disable_<library_name> for <library_name> will be removed in the next major release. Use instrumentation.<library_name> 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.<library_name>: disabled` or `NEW_RELIC_INSTRUMENTATION_<LIBRARY_NAME>=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)
kaylareopelle marked this conversation as resolved.
Show resolved Hide resolved

- **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)
Expand Down
1 change: 1 addition & 0 deletions lib/new_relic/agent/configuration/default_source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.'
},
Expand Down
9 changes: 1 addition & 8 deletions lib/new_relic/dependency_detection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,21 +144,14 @@ 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?

key = "disable_#{self.name}".to_sym
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
Expand Down
Loading