Class: Datadog::Tracing::Contrib::Sneakers::Integration

Inherits:
Object
  • Object
show all
Includes:
Integration
Defined in:
lib/datadog/tracing/contrib/sneakers/integration.rb

Overview

Description of Sneakers integration

Constant Summary collapse

MINIMUM_SNEAKERS_VERSION =
Gem::Version.new('2.12.0')
MINIMUM_KICKS_VERSION =

All versions are supported. Kicks first version is 3.0.0.

Gem::Version.new('3.0.0')

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Integration

included

Class Method Details

.compatible?Boolean

Returns:

  • (Boolean)


40
41
42
# File 'lib/datadog/tracing/contrib/sneakers/integration.rb', line 40

def self.compatible?
  super && !!(version&.>= MINIMUM_SNEAKERS_VERSION)
end

.loaded?Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/datadog/tracing/contrib/sneakers/integration.rb', line 36

def self.loaded?
  !defined?(::Sneakers).nil?
end

.versionObject

Sneakers development continues in the Kicks gem. The only thing that has changed is the gem name, even the file naming and module namespacing are the same (require ‘sneakers’, ::Sneakers).

The last version of Sneakers is 2.12.0. The first version of Kicks is 3.0.0. We currently support all versions of Kicks.



32
33
34
# File 'lib/datadog/tracing/contrib/sneakers/integration.rb', line 32

def self.version
  Gem.loaded_specs['sneakers']&.version || Gem.loaded_specs['kicks']&.version
end

Instance Method Details

#new_configurationObject



44
45
46
# File 'lib/datadog/tracing/contrib/sneakers/integration.rb', line 44

def new_configuration
  Configuration::Settings.new
end

#patcherObject



48
49
50
# File 'lib/datadog/tracing/contrib/sneakers/integration.rb', line 48

def patcher
  Patcher
end