Sha256: 5c7c6526605ca6483934536cc61bd9c6ca7d97dc9ad403ad311c302bbad81811

Contents?: true

Size: 749 Bytes

Versions: 15

Compression:

Stored size: 749 Bytes

Contents

# typed: true

module Datadog
  module AppSec
    module Contrib
      module Rails
        # Rails specific framework tie
        module Framework
          def self.setup
            Datadog::AppSec.configure do |datadog_config|
              rails_config = config_with_defaults(datadog_config)
              activate_rack!(datadog_config, rails_config)
            end
          end

          def self.config_with_defaults(datadog_config)
            datadog_config[:rails]
          end

          # Apply relevant configuration from Sinatra to Rack
          def self.activate_rack!(datadog_config, sinatra_config)
            datadog_config.instrument(
              :rack,
            )
          end
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
ddtrace-1.8.0 lib/datadog/appsec/contrib/rails/framework.rb
ddtrace-1.7.0 lib/datadog/appsec/contrib/rails/framework.rb
ddtrace-1.6.1 lib/datadog/appsec/contrib/rails/framework.rb
ddtrace-1.6.0 lib/datadog/appsec/contrib/rails/framework.rb
ddtrace-1.5.2 lib/datadog/appsec/contrib/rails/framework.rb
ddtrace-1.5.1 lib/datadog/appsec/contrib/rails/framework.rb
ddtrace-1.5.0 lib/datadog/appsec/contrib/rails/framework.rb
ddtrace-1.4.2 lib/datadog/appsec/contrib/rails/framework.rb
ddtrace-1.4.1 lib/datadog/appsec/contrib/rails/framework.rb
ddtrace-1.4.0 lib/datadog/appsec/contrib/rails/framework.rb
ddtrace-1.3.0 lib/datadog/appsec/contrib/rails/framework.rb
ddtrace-1.2.0 lib/datadog/appsec/contrib/rails/framework.rb
ddtrace-1.1.0 lib/datadog/appsec/contrib/rails/framework.rb
ddtrace-1.0.0 lib/datadog/appsec/contrib/rails/framework.rb
ddtrace-1.0.0.beta2 lib/datadog/appsec/contrib/rails/framework.rb