class Datadog::Contrib::Configuration::Settings

Common settings for all integrations

Constants

DEPRECATION_WARNING
DEPRECATION_WARN_ONLY_ONCE

Public Instance Methods

[](name) click to toggle source
# File lib/ddtrace/contrib/configuration/settings.rb, line 33
def [](name)
  respond_to?(name) ? send(name) : get_option(name)
end
[]=(name, value) click to toggle source
# File lib/ddtrace/contrib/configuration/settings.rb, line 37
def []=(name, value)
  respond_to?("#{name}=") ? send("#{name}=", value) : set_option(name, value)
end
configure(options = {}) { |self| ... } click to toggle source
# File lib/ddtrace/contrib/configuration/settings.rb, line 25
def configure(options = {})
  self.class.options.dependency_order.each do |name|
    self[name] = options[name] if options.key?(name)
  end

  yield(self) if block_given?
end
log_deprecation_warning() click to toggle source
# File lib/ddtrace/contrib/configuration/settings.rb, line 48
def log_deprecation_warning
  DEPRECATION_WARN_ONLY_ONCE.run do
    Datadog.logger.warn("tracer:#{DEPRECATION_WARNING}:#{caller.join("\n")}")
  end
end