Skip to content

Commit

Permalink
Merge pull request #726 from newrelic/method_tracer_code_header_fix
Browse files Browse the repository at this point in the history
Use `assemble_code_header` in `method_with_push_scope`
  • Loading branch information
tannalynn authored Jul 14, 2021
2 parents 72d7b04 + 17049c8 commit 0977320
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/new_relic/agent/method_tracer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down

0 comments on commit 0977320

Please sign in to comment.