From d7ea08ccf0f0866f966efe7af75d8b8afcfff8a0 Mon Sep 17 00:00:00 2001 From: Tanna McClure Date: Tue, 23 Jan 2024 14:16:24 -0800 Subject: [PATCH 1/3] update default source insert point --- lib/tasks/instrumentation_generator/instrumentation.thor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/instrumentation_generator/instrumentation.thor b/lib/tasks/instrumentation_generator/instrumentation.thor index 64fe40acc8..633786052e 100644 --- a/lib/tasks/instrumentation_generator/instrumentation.thor +++ b/lib/tasks/instrumentation_generator/instrumentation.thor @@ -82,7 +82,7 @@ class Instrumentation < Thor insert_into_file( DEFAULT_SOURCE_LOCATION, config_block(name.downcase), - after: ":description => 'Controls auto-instrumentation of bunny at start-up. May be one of [auto|prepend|chain|disabled].' + after: ":description => 'Controls auto-instrumentation of bunny at start-up. May be one of: `auto`, `prepend`, `chain`, `disabled`.' },\n" ) end From b16aafd3131804b325299f9565571fd3332a21a8 Mon Sep 17 00:00:00 2001 From: Tanna McClure Date: Tue, 23 Jan 2024 14:17:22 -0800 Subject: [PATCH 2/3] remove redundant line from thor template --- lib/tasks/instrumentation_generator/templates/chain_method.tt | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/tasks/instrumentation_generator/templates/chain_method.tt b/lib/tasks/instrumentation_generator/templates/chain_method.tt index c318b4405f..00d60621ce 100644 --- a/lib/tasks/instrumentation_generator/templates/chain_method.tt +++ b/lib/tasks/instrumentation_generator/templates/chain_method.tt @@ -1,5 +1,4 @@ alias_method(:<%= @method.downcase %>_without_new_relic, :<%= @method.downcase %>) -alias_method(:<%= @method.downcase %>, :<%= @method.downcase %>_with_new_relic) def <%= @method.downcase %><%= "(#{@args})" unless @args.empty? %> <%= @method.downcase %>_with_new_relic<%= "(#{@args})" unless @args.empty? %> do From 6c1e7101587525a0b3b97976b315702f03be8272 Mon Sep 17 00:00:00 2001 From: Tanna McClure Date: Tue, 23 Jan 2024 14:18:45 -0800 Subject: [PATCH 3/3] remove redundant line from thor template --- lib/tasks/instrumentation_generator/templates/chain.tt | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/tasks/instrumentation_generator/templates/chain.tt b/lib/tasks/instrumentation_generator/templates/chain.tt index 795809b6a9..04d7459dd3 100644 --- a/lib/tasks/instrumentation_generator/templates/chain.tt +++ b/lib/tasks/instrumentation_generator/templates/chain.tt @@ -9,7 +9,6 @@ module NewRelic::Agent::Instrumentation include NewRelic::Agent::Instrumentation::<%= @class_name %> alias_method(:<%= @method.downcase %>_without_new_relic, :<%= @method.downcase %>) - alias_method(:<%= @method.downcase %>, :<%= @method.downcase %>_with_new_relic) def <%= @method.downcase %><%= "(#{@args})" unless @args.empty? %> <%= @method.downcase %>_with_new_relic<%= "(#{@args})" unless @args.empty? %> do