lib/elastic_apm/spies/faraday.rb in elastic-apm-3.12.1 vs lib/elastic_apm/spies/faraday.rb in elastic-apm-3.13.0
- old
+ new
@@ -26,16 +26,18 @@
SUBTYPE = 'faraday'
def self.without_net_http
return yield unless defined?(NetHTTPSpy)
+ # rubocop:disable Style/ExplicitBlockArgument
ElasticAPM::Spies::NetHTTPSpy.disable_in do
yield
end
+ # rubocop:enable Style/ExplicitBlockArgument
end
- # rubocop:disable Metrics/CyclomaticComplexity
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
def install
::Faraday::Connection.class_eval do
alias run_request_without_apm run_request
def run_request(method, url, body, headers, &block)
@@ -94,10 +96,10 @@
end
end
end
end
end
- # rubocop:enable Metrics/CyclomaticComplexity
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
end
register 'Faraday', 'faraday', FaradaySpy.new
end
end