Sha256: 649909f32d0f0f304e896801cbada4ab4a530a6d36ab13ac5038c1d390f70fdc

Contents?: true

Size: 1.36 KB

Versions: 3

Compression:

Stored size: 1.36 KB

Contents

require_relative '../../configuration/settings'
require_relative '../ext'

require_relative '../../../../core'

module Datadog
  module Tracing
    module Contrib
      module ActionPack
        module Configuration
          # Custom settings for the ActionPack integration
          # @public_api
          class Settings < Contrib::Configuration::Settings
            option :enabled do |o|
              o.type :bool
              o.env Ext::ENV_ENABLED
              o.default true
            end

            option :analytics_enabled do |o|
              o.type :bool, nilable: true
              o.env Ext::ENV_ANALYTICS_ENABLED
            end

            option :analytics_sample_rate do |o|
              o.type :float
              o.env Ext::ENV_ANALYTICS_SAMPLE_RATE
              o.default 1.0
            end

            # DEV-2.0: Breaking changes for removal.
            option :exception_controller do |o|
              o.on_set do |value|
                if value
                  Datadog::Core.log_deprecation do
                    'The error controller is now automatically detected. '\
                    "Option `#{o.instance_variable_get(:@name)}` is no longer required and will be removed."
                  end
                end
              end
            end

            option :service_name
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ddtrace-1.14.0 lib/datadog/tracing/contrib/action_pack/configuration/settings.rb
ddtrace-1.13.1 lib/datadog/tracing/contrib/action_pack/configuration/settings.rb
ddtrace-1.13.0 lib/datadog/tracing/contrib/action_pack/configuration/settings.rb