Class: Datadog::Tracing::Contrib::GraphQL::Integration

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

Overview

Description of GraphQL integration

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Integration

included

Class Method Details

.compatible?Boolean

Breaking changes are introduced in ‘2.2.6` and have been backported to

  • 1.13.21

  • 2.0.28

  • 2.1.11

Returns:

  • (Boolean)


32
33
34
35
36
37
38
39
# File 'lib/datadog/tracing/contrib/graphql/integration.rb', line 32

def self.compatible?
  super && (
    (version >= Gem::Version.new('1.13.21') && version < Gem::Version.new('2.0')) ||
    (version >= Gem::Version.new('2.0.28') && version < Gem::Version.new('2.1')) ||
    (version >= Gem::Version.new('2.1.11') && version < Gem::Version.new('2.2')) ||
    (version >= Gem::Version.new('2.2.6'))
  )
end

.loaded?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/datadog/tracing/contrib/graphql/integration.rb', line 22

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

.trace_supported?Boolean

Returns:

  • (Boolean)


41
42
43
# File 'lib/datadog/tracing/contrib/graphql/integration.rb', line 41

def self.trace_supported?
  version >= Gem::Version.new('2.0.19')
end

.versionObject



18
19
20
# File 'lib/datadog/tracing/contrib/graphql/integration.rb', line 18

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

Instance Method Details

#new_configurationObject



45
46
47
# File 'lib/datadog/tracing/contrib/graphql/integration.rb', line 45

def new_configuration
  Configuration::Settings.new
end

#patcherObject



49
50
51
# File 'lib/datadog/tracing/contrib/graphql/integration.rb', line 49

def patcher
  Patcher
end