From a63dfbd2a3014d58f847232f4e518c70c3431ee7 Mon Sep 17 00:00:00 2001 From: Tanna McClure Date: Wed, 11 Sep 2024 16:16:49 -0500 Subject: [PATCH 1/2] fix jruby config bug --- lib/new_relic/agent/configuration/manager.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/new_relic/agent/configuration/manager.rb b/lib/new_relic/agent/configuration/manager.rb index 40249f8a8f..9d56c2c006 100644 --- a/lib/new_relic/agent/configuration/manager.rb +++ b/lib/new_relic/agent/configuration/manager.rb @@ -388,7 +388,7 @@ def reset_cache # modified. The hash really only needs to be modified for the benefit # of the security agent, so if JRuby is in play and the security agent # is not, don't attempt to modify the hash at all and return early. - return @cache if NewRelic::LanguageSupport.jruby? && !Agent.config[:'security.agent.enabled'] + return new_cache if NewRelic::LanguageSupport.jruby? && !Agent.config[:'security.agent.enabled'] @lock.synchronize do preserved = @cache.dup.select { |_k, v| DEPENDENCY_DETECTION_VALUES.include?(v) } From 65dfe180de7daa6ce423668530d5b3e4fe58d029 Mon Sep 17 00:00:00 2001 From: Tanna McClure Date: Wed, 11 Sep 2024 16:20:15 -0500 Subject: [PATCH 2/2] add changelog entry --- CHANGELOG.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 04f7790875..1bfa3fb77e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,12 +2,16 @@ ## dev -Version adds instrumentation for the rdkafka gem. +Version adds instrumentation for the rdkafka gem and fixes a JRuby bug in the configuration manager. - **Feature: Add instrumentation for the rdkafka gem** The agent now has instrumentation for the rdkafka gem and will record message broker segments for produce and consume calls made using this gem. [PR#2824](https://github.com/newrelic/newrelic-ruby-agent/pull/2824) +- **Bugfix: Jruby not saving configuration values correctly in configuration manager** + + Previously, a change made to fix a different JRuby bug caused the agent to not save configuration values correctly in the configuration manager when running on JRuby. This has been fixed. [PR#2848](https://github.com/newrelic/newrelic-ruby-agent/pull/2848) + ## v9.13.0