Skip to content

Commit

Permalink
Merge pull request #1275 from callumj/cj-na-freeze
Browse files Browse the repository at this point in the history
Make frequently allocated string a constant
  • Loading branch information
ericmustin authored Dec 7, 2020
2 parents 750ebd9 + 52ce4b0 commit 8784076
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ddtrace/contrib/ethon/easy_patch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ def datadog_span_started?

def datadog_tag_request
span = @datadog_span
method = 'N/A'
method = Ext::NOT_APPLICABLE_METHOD
if instance_variable_defined?(:@datadog_method) && !@datadog_method.nil?
method = @datadog_method.to_s
end
Expand Down
1 change: 1 addition & 0 deletions lib/ddtrace/contrib/ethon/ext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ module Ext
SERVICE_NAME = 'ethon'.freeze
SPAN_REQUEST = 'ethon.request'.freeze
SPAN_MULTI_REQUEST = 'ethon.multi.request'.freeze
NOT_APPLICABLE_METHOD = 'N/A'.freeze
end
end
end
Expand Down

0 comments on commit 8784076

Please sign in to comment.