Sha256: 8a93089a574470f8ad36c056b0da97746e2c3922af5c004dfdc83e423a71529f

Contents?: true

Size: 746 Bytes

Versions: 14

Compression:

Stored size: 746 Bytes

Contents

# frozen_string_literal: true

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

require 'opentelemetry'

module OpenTelemetry
  module Instrumentation
    module Koala
      # The Instrumentation class contains logic to detect and install the Koala instrumentation
      class Instrumentation < OpenTelemetry::Instrumentation::Base
        install do |_config|
          require_dependencies
          patch
        end

        present do
          !defined?(::Koala).nil?
        end

        private

        def require_dependencies
          require_relative 'patches/instrumentation'
        end

        def patch
          ::Koala::Facebook::API.prepend(Patches::Api)
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
opentelemetry-instrumentation-koala-0.20.6 lib/opentelemetry/instrumentation/koala/instrumentation.rb
opentelemetry-instrumentation-koala-0.20.5 lib/opentelemetry/instrumentation/koala/instrumentation.rb
opentelemetry-instrumentation-koala-0.20.3 lib/opentelemetry/instrumentation/koala/instrumentation.rb
opentelemetry-instrumentation-koala-0.20.2 lib/opentelemetry/instrumentation/koala/instrumentation.rb
opentelemetry-instrumentation-koala-0.20.1 lib/opentelemetry/instrumentation/koala/instrumentation.rb
opentelemetry-instrumentation-koala-0.20.0 lib/opentelemetry/instrumentation/koala/instrumentation.rb
opentelemetry-instrumentation-koala-0.19.1 lib/opentelemetry/instrumentation/koala/instrumentation.rb
opentelemetry-instrumentation-koala-0.19.0 lib/opentelemetry/instrumentation/koala/instrumentation.rb
opentelemetry-instrumentation-koala-0.18.5 lib/opentelemetry/instrumentation/koala/instrumentation.rb
opentelemetry-instrumentation-koala-0.18.4 lib/opentelemetry/instrumentation/koala/instrumentation.rb
opentelemetry-instrumentation-koala-0.18.3 lib/opentelemetry/instrumentation/koala/instrumentation.rb
opentelemetry-instrumentation-koala-0.18.2 lib/opentelemetry/instrumentation/koala/instrumentation.rb
opentelemetry-instrumentation-koala-0.18.1 lib/opentelemetry/instrumentation/koala/instrumentation.rb
opentelemetry-instrumentation-koala-0.18.0 lib/opentelemetry/instrumentation/koala/instrumentation.rb