lib/elastic_apm/spies/faraday.rb in elastic-apm-2.1.1 vs lib/elastic_apm/spies/faraday.rb in elastic-apm-2.1.2

- old
+ new

@@ -13,10 +13,14 @@ def run_request(method, url, body, headers, &block) unless (transaction = ElasticAPM.current_transaction) return run_request_without_apm(method, url, body, headers, &block) end - host = URI(url).host + host = if url_prefix.is_a?(URI) && url_prefix.host + url_prefix.host + else + URI(url).host + end name = "#{method.upcase} #{host}" type = "ext.faraday.#{method}" ElasticAPM.with_span name, type do |span|