Sha256: 4bf22d8c9f83e5b639e75b281c9a447960804b60327d0d52783836ad8e354db9

Contents?: true

Size: 895 Bytes

Versions: 16

Compression:

Stored size: 895 Bytes

Contents

require 'ddtrace/contrib/integration'
require 'ddtrace/contrib/kafka/configuration/settings'
require 'ddtrace/contrib/kafka/patcher'

module Datadog
  module Contrib
    module Kafka
      # Description of Kafka integration
      class Integration
        include Contrib::Integration

        MINIMUM_VERSION = Gem::Version.new('0.7.10')

        register_as :kafka, auto_patch: false

        def self.version
          Gem.loaded_specs['ruby-kafka'] && Gem.loaded_specs['ruby-kafka'].version
        end

        def self.loaded?
          !defined?(::Kafka).nil? \
            && !defined?(::ActiveSupport::Notifications).nil?
        end

        def self.compatible?
          super && version >= MINIMUM_VERSION
        end

        def default_configuration
          Configuration::Settings.new
        end

        def patcher
          Patcher
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
ddtrace-0.51.1 lib/ddtrace/contrib/kafka/integration.rb
ddtrace-0.51.0 lib/ddtrace/contrib/kafka/integration.rb
ddtrace-0.50.0 lib/ddtrace/contrib/kafka/integration.rb
ddtrace-0.49.0 lib/ddtrace/contrib/kafka/integration.rb
ddtrace-0.48.0 lib/ddtrace/contrib/kafka/integration.rb
ddtrace-0.47.0 lib/ddtrace/contrib/kafka/integration.rb
ddtrace-0.46.0 lib/ddtrace/contrib/kafka/integration.rb
ddtrace-0.45.0 lib/ddtrace/contrib/kafka/integration.rb
ddtrace-0.44.0 lib/ddtrace/contrib/kafka/integration.rb
ddtrace-0.43.0 lib/ddtrace/contrib/kafka/integration.rb
ddtrace-0.42.0 lib/ddtrace/contrib/kafka/integration.rb
ddtrace-0.41.0 lib/ddtrace/contrib/kafka/integration.rb
ls-trace-0.2.0 lib/ddtrace/contrib/kafka/integration.rb
ddtrace-0.40.0 lib/ddtrace/contrib/kafka/integration.rb
ddtrace-0.39.0 lib/ddtrace/contrib/kafka/integration.rb
ddtrace-0.38.0 lib/ddtrace/contrib/kafka/integration.rb