lib/elastic_apm/spies/faraday.rb in elastic-apm-2.4.0 vs lib/elastic_apm/spies/faraday.rb in elastic-apm-2.5.0

- old
+ new

@@ -15,9 +15,14 @@ return run_request_without_apm(method, url, body, headers, &block) end host = if url_prefix.is_a?(URI) && url_prefix.host url_prefix.host + elsif url.nil? + tmp_request = build_request(method) do |req| + yield(req) if block_given? + end + URI(tmp_request.path).host else URI(url).host end name = "#{method.upcase} #{host}"