Sha256: 4fefa18cb071df3aff66c73388dd3c11d600a9f9887a2662d628ca54a89ee491

Contents?: true

Size: 829 Bytes

Versions: 6

Compression:

Stored size: 829 Bytes

Contents

# frozen_string_literal: true

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

module OpenTelemetry
  module Instrumentation
    module ActiveSupport
      # The Instrumentation class contains logic to detect and install the ActiveSupport instrumentation
      class Instrumentation < OpenTelemetry::Instrumentation::Base
        MINIMUM_VERSION = Gem::Version.new('6.1.0')

        install do |_config|
          require_dependencies
        end

        present do
          defined?(::ActiveSupport)
        end

        compatible do
          gem_version >= MINIMUM_VERSION
        end

        private

        def gem_version
          ::ActiveSupport.version
        end

        def require_dependencies
          require_relative 'span_subscriber'
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
opentelemetry-instrumentation-active_support-0.7.0 lib/opentelemetry/instrumentation/active_support/instrumentation.rb
opentelemetry-instrumentation-active_support-0.6.0 lib/opentelemetry/instrumentation/active_support/instrumentation.rb
opentelemetry-instrumentation-active_support-0.5.3 lib/opentelemetry/instrumentation/active_support/instrumentation.rb
opentelemetry-instrumentation-active_support-0.5.2 lib/opentelemetry/instrumentation/active_support/instrumentation.rb
opentelemetry-instrumentation-active_support-0.5.1 lib/opentelemetry/instrumentation/active_support/instrumentation.rb
opentelemetry-instrumentation-active_support-0.5.0 lib/opentelemetry/instrumentation/active_support/instrumentation.rb