lib/instana/instrumentation/rack.rb in instana-1.9.6 vs lib/instana/instrumentation/rack.rb in instana-1.9.7

- old
+ new

@@ -22,16 +22,17 @@ if ENV.key?('INSTANA_SERVICE_NAME') kvs[:service] = ENV['INSTANA_SERVICE_NAME'] end if ::Instana.agent.extra_headers - for custom_header in ::Instana.agent.extra_headers + ::Instana.agent.extra_headers.each { |custom_header| # Headers are available in this format: HTTP_X_CAPTURE_THIS - rack_header = ('HTTP_' + custom_header.upcase).gsub('-', '_') + rack_header = 'HTTP_' + custom_header.upcase + rack_header.tr!('-', '_') if env.key?(rack_header) kvs["http.#{custom_header}"] = env[rack_header] end - end + } end # Check incoming context incoming_context = {} if env.key?('HTTP_X_INSTANA_T')