lib/ddtrace/contrib/sinatra/env.rb in ddtrace-0.45.0 vs lib/ddtrace/contrib/sinatra/env.rb in ddtrace-0.46.0
- old
+ new
@@ -21,12 +21,10 @@
headers ||= []
{}.tap do |result|
headers.each do |header|
rack_header = header_to_rack_header(header)
- if env.key?(rack_header)
- result[Datadog::Ext::HTTP::RequestHeaders.to_tag(header)] = env[rack_header]
- end
+ result[Datadog::Ext::HTTP::RequestHeaders.to_tag(header)] = env[rack_header] if env.key?(rack_header)
end
end
end
def header_to_rack_header(name)