lib/instana/instrumentation/net-http.rb in instana-1.195.1 vs lib/instana/instrumentation/net-http.rb in instana-1.195.2

- old
+ new

@@ -30,19 +30,21 @@ # Collect up KV info now in case any exception is raised kv_payload = { :http => {} } kv_payload[:http][:method] = request.method if request.uri - kv_payload[:http][:url] = request.uri.to_s + uri_without_query = request.uri.dup.tap { |r| r.query = nil } + kv_payload[:http][:url] = uri_without_query.to_s.gsub(/\?\z/, '') + kv_payload[:http][:params] = ::Instana.secrets.remove_from_query(request.uri.query) else if use_ssl? kv_payload[:http][:url] = "https://#{@address}:#{@port}#{request.path}" else kv_payload[:http][:url] = "http://#{@address}:#{@port}#{request.path}" end end - kv_payload[:http][:url] = ::Instana.secrets.remove_from_query(kv_payload[:http][:url]) + kv_payload[:http][:url] = ::Instana.secrets.remove_from_query(kv_payload[:http][:url]).gsub(/\?\z/, '') # The core call response = super(*args, &block) kv_payload[:http][:status] = response.code