Sha256: 6312bfd7848562e6faca69d4ea89d671039f6a3f809ac6aa2d45ec3845e8c958

Contents?: true

Size: 633 Bytes

Versions: 30

Compression:

Stored size: 633 Bytes

Contents

# frozen_string_literal: true

# Copyright The OpenTelemetry Authors
#
# SPDX-License-Identifier: Apache-2.0

module OpenTelemetry
  module Instrumentation
    module Faraday
      module Patches
        # 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 RackBuilder
          def adapter(*args)
            use(:open_telemetry) unless @handlers.any? do |handler|
              handler.klass == Faraday::Middlewares::TracerMiddleware
            end

            super
          end
        end
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
opentelemetry-instrumentation-faraday-0.24.8 lib/opentelemetry/instrumentation/faraday/patches/rack_builder.rb
opentelemetry-instrumentation-faraday-0.24.7 lib/opentelemetry/instrumentation/faraday/patches/rack_builder.rb
opentelemetry-instrumentation-faraday-0.24.6 lib/opentelemetry/instrumentation/faraday/patches/rack_builder.rb
opentelemetry-instrumentation-faraday-0.24.5 lib/opentelemetry/instrumentation/faraday/patches/rack_builder.rb
opentelemetry-instrumentation-faraday-0.24.4 lib/opentelemetry/instrumentation/faraday/patches/rack_builder.rb
opentelemetry-instrumentation-faraday-0.24.2 lib/opentelemetry/instrumentation/faraday/patches/rack_builder.rb
opentelemetry-instrumentation-faraday-0.24.1 lib/opentelemetry/instrumentation/faraday/patches/rack_builder.rb
opentelemetry-instrumentation-faraday-0.24.0 lib/opentelemetry/instrumentation/faraday/patches/rack_builder.rb
opentelemetry-instrumentation-faraday-0.23.4 lib/opentelemetry/instrumentation/faraday/patches/rack_builder.rb
opentelemetry-instrumentation-faraday-0.23.3 lib/opentelemetry/instrumentation/faraday/patches/rack_builder.rb
opentelemetry-instrumentation-faraday-0.23.2 lib/opentelemetry/instrumentation/faraday/patches/rack_builder.rb
opentelemetry-instrumentation-faraday-0.23.1 lib/opentelemetry/instrumentation/faraday/patches/rack_builder.rb
opentelemetry-instrumentation-faraday-0.23.0 lib/opentelemetry/instrumentation/faraday/patches/rack_builder.rb
opentelemetry-instrumentation-faraday-0.22.0 lib/opentelemetry/instrumentation/faraday/patches/rack_builder.rb
opentelemetry-instrumentation-faraday-0.21.0 lib/opentelemetry/instrumentation/faraday/patches/rack_builder.rb
opentelemetry-instrumentation-faraday-0.20.1 lib/opentelemetry/instrumentation/faraday/patches/rack_builder.rb
opentelemetry-instrumentation-faraday-0.20.0 lib/opentelemetry/instrumentation/faraday/patches/rack_builder.rb
opentelemetry-instrumentation-faraday-0.19.3 lib/opentelemetry/instrumentation/faraday/patches/rack_builder.rb
opentelemetry-instrumentation-faraday-0.19.2 lib/opentelemetry/instrumentation/faraday/patches/rack_builder.rb
opentelemetry-instrumentation-faraday-0.19.1 lib/opentelemetry/instrumentation/faraday/patches/rack_builder.rb