lib/request_tracer/integration/faraday_handler.rb in request-tracer-0.6.6 vs lib/request_tracer/integration/faraday_handler.rb in request-tracer-0.7.0
- old
+ new
@@ -5,13 +5,10 @@
module RequestTracer
module Integration
module FaradayHandler
extend self
def activate
- ::Faraday::Request.register_middleware(nil, tracing: FaradayTracing)
- builder = Faraday::RackBuilder.new
- builder.insert 0, FaradayTracing
- Faraday.default_connection_options.builder = builder
+ ::Faraday::Middleware.register_middleware tracing: FaradayTracing
end
end
class FaradayTracing < ::Faraday::Middleware
include Base
def call(env)