diff --git a/lib/new_relic/agent/method_tracer.rb b/lib/new_relic/agent/method_tracer.rb index 6f48351b98..5a8125d137 100644 --- a/lib/new_relic/agent/method_tracer.rb +++ b/lib/new_relic/agent/method_tracer.rb @@ -199,7 +199,7 @@ def method_without_push_scope(method_name, metric_name_code, options) # for a fully traced metric including scoping def method_with_push_scope(method_name, metric_name_code, options) "def #{_traced_method_name(method_name, metric_name_code)}(#{ARGS_FOR_RUBY_VERSION}) - #{options[:code_header]} + #{assemble_code_header(method_name, metric_name_code, options)} result = ::NewRelic::Agent::MethodTracerHelpers.trace_execution_scoped(\"#{metric_name_code}\", :metric => #{options[:metric]}) do #{_untraced_method_name(method_name, metric_name_code)}(#{ARGS_FOR_RUBY_VERSION})