Class: Datadog::Contrib::ActiveRecord::Integration

Inherits:
Object
  • Object
show all
Includes:
Integration
Defined in:
lib/ddtrace/contrib/active_record/integration.rb

Overview

Describes the ActiveRecord integration

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Integration

included

Class Method Details

.compatible?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/ddtrace/contrib/active_record/integration.rb', line 26

def self.compatible?
  super && version >= Gem::Version.new('3.0')
end

.present?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/ddtrace/contrib/active_record/integration.rb', line 22

def self.present?
  super && defined?(::ActiveRecord)
end

.versionObject



18
19
20
# File 'lib/ddtrace/contrib/active_record/integration.rb', line 18

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

Instance Method Details

#default_configurationObject



30
31
32
# File 'lib/ddtrace/contrib/active_record/integration.rb', line 30

def default_configuration
  Configuration::Settings.new
end

#patcherObject



34
35
36
# File 'lib/ddtrace/contrib/active_record/integration.rb', line 34

def patcher
  ActiveRecord::Patcher
end

#resolverObject



38
39
40
# File 'lib/ddtrace/contrib/active_record/integration.rb', line 38

def resolver
  @resolver ||= Configuration::Resolver.new
end