Module: Datadog::CI::Contrib::Integration::InstanceMethods

Defined in:
lib/datadog/ci/contrib/integration.rb

Instance Method Summary collapse

Instance Method Details

#auto_instrument?Boolean

Can the patch for this integration be applied automatically?

Returns:

  • (Boolean)

    can the tracer activate this instrumentation without explicit user input?



129
130
131
# File 'lib/datadog/ci/contrib/integration.rb', line 129

def auto_instrument?
  true
end

#configurationObject

returns the configuration instance.



82
83
84
# File 'lib/datadog/ci/contrib/integration.rb', line 82

def configuration
  @configuration ||= new_configuration
end

#configure(options = {}, &block) ⇒ Object



86
87
88
89
# File 'lib/datadog/ci/contrib/integration.rb', line 86

def configure(options = {}, &block)
  configuration.configure(options, &block)
  configuration
end

#enabledObject



96
97
98
# File 'lib/datadog/ci/contrib/integration.rb', line 96

def enabled
  configuration.enabled
end

#patcherContrib::Patcher

The patcher module to inject instrumented objects into the instrumentation target.

Contrib::Patcher includes the basic functionality of a patcher. ‘include`ing Contrib::Patcher into a new module is the recommend way to create a custom patcher.

Returns:

  • (Contrib::Patcher)

    a module that ‘include`s Contrib::Patcher



106
107
108
# File 'lib/datadog/ci/contrib/integration.rb', line 106

def patcher
  nil
end

#reset_configuration!Object

Resets all configuration options



92
93
94
# File 'lib/datadog/ci/contrib/integration.rb', line 92

def reset_configuration!
  @configuration = nil
end