lib/opentelemetry/instrumentation/faraday/patches/connection.rb in opentelemetry-instrumentation-faraday-0.24.8 vs lib/opentelemetry/instrumentation/faraday/patches/connection.rb in opentelemetry-instrumentation-faraday-0.25.0
- old
+ new
@@ -11,10 +11,10 @@
# Module to be prepended to force Faraday to use the middleware by
# default so the user doesn't have to call `use` for every connection.
module Connection
# Wraps Faraday::Connection#initialize:
# https://github.com/lostisland/faraday/blob/ff9dc1d1219a1bbdba95a9a4cf5d135b97247ee2/lib/faraday/connection.rb#L62-L92
- def initialize(*args)
+ def initialize(...)
super.tap do
use(:open_telemetry) unless builder.handlers.any? do |handler|
handler.klass == Middlewares::TracerMiddleware
end
end