Sha256: 31cdfe1bfeecd189501a16b90c5be98a5db3c856f26d3d18567a6b97f71c715e

Contents?: true

Size: 811 Bytes

Versions: 25

Compression:

Stored size: 811 Bytes

Contents

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

module Datadog
  module Contrib
    module GRPC
      # Description of gRPC integration
      class Integration
        include Contrib::Integration

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

        register_as :grpc, auto_patch: true

        def self.version
          Gem.loaded_specs['grpc'] && Gem.loaded_specs['grpc'].version
        end

        def self.loaded?
          !defined?(::GRPC).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

25 entries across 25 versions & 2 rubygems

Version Path
ddtrace-0.35.0 lib/ddtrace/contrib/grpc/integration.rb
ddtrace-0.34.2 lib/ddtrace/contrib/grpc/integration.rb
ddtrace-0.34.1 lib/ddtrace/contrib/grpc/integration.rb
ddtrace-0.34.0 lib/ddtrace/contrib/grpc/integration.rb
ddtrace-0.33.1 lib/ddtrace/contrib/grpc/integration.rb