Sha256: 64d619a81f162f9515e3484d92060a503b720e0ba76e6bda9c08fc61a4a33c0a

Contents?: true

Size: 839 Bytes

Versions: 13

Compression:

Stored size: 839 Bytes

Contents

require 'ddtrace/contrib/configuration/settings'
require 'ddtrace/contrib/active_record/utils'

module Datadog
  module Contrib
    module ActiveRecord
      module Configuration
        # Unique settings for ActiveRecord
        class Settings < Contrib::Configuration::Settings
          option :orm_service_name
          option :service_name, depends_on: [:tracer] do |value|
            (value || Utils.adapter_name).tap do |service_name|
              tracer.set_service_info(service_name, 'active_record', Ext::AppTypes::DB)
            end
          end

          option :tracer, default: Datadog.tracer do |value|
            value.tap do
              Events.subscriptions.each do |subscription|
                subscription.tracer = value
              end
            end
          end
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ddtrace-0.16.1 lib/ddtrace/contrib/active_record/configuration/settings.rb
ddtrace-0.15.0.internaltracinfeature1 lib/ddtrace/contrib/active_record/configuration/settings.rb
ddtrace-0.16.0 lib/ddtrace/contrib/active_record/configuration/settings.rb
ddtrace-0.14.2.disableprotocolversion4 lib/ddtrace/contrib/active_record/configuration/settings.rb
ddtrace-0.15.0 lib/ddtrace/contrib/active_record/configuration/settings.rb
ddtrace-0.14.2.withoutpriorityparsing1 lib/ddtrace/contrib/active_record/configuration/settings.rb
ddtrace-0.14.2 lib/ddtrace/contrib/active_record/configuration/settings.rb
ddtrace-0.14.1 lib/ddtrace/contrib/active_record/configuration/settings.rb
ddtrace-0.15.0.beta1 lib/ddtrace/contrib/active_record/configuration/settings.rb
ddtrace-0.14.0 lib/ddtrace/contrib/active_record/configuration/settings.rb
ddtrace-0.14.0.rc1 lib/ddtrace/contrib/active_record/configuration/settings.rb
ddtrace-0.14.0.beta2 lib/ddtrace/contrib/active_record/configuration/settings.rb
ddtrace-0.14.0.beta1 lib/ddtrace/contrib/active_record/configuration/settings.rb