Sha256: 81c4b20458bb6905d0be55c412d328b8c1888ef5979c4107468d3c9c2f3c59f1

Contents?: true

Size: 846 Bytes

Versions: 2

Compression:

Stored size: 846 Bytes

Contents

require_relative 'appsec/configuration'
require_relative 'appsec/extensions'

module Datadog
  # Namespace for Datadog AppSec instrumentation
  module AppSec
    include Configuration

    class << self
      def enabled?
        Datadog.configuration.appsec.enabled
      end

      def processor
        appsec_component = components.appsec

        appsec_component.processor if appsec_component
      end

      private

      def components
        Datadog.send(:components)
      end
    end

    def self.writer
      @writer ||= Writer.new
    end

    # Expose AppSec to global shared objects
    Extensions.activate!
  end
end

# Integrations
require_relative 'appsec/contrib/rack/integration'
require_relative 'appsec/contrib/sinatra/integration'
require_relative 'appsec/contrib/rails/integration'

require_relative 'appsec/autoload'

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ddtrace-1.10.1 lib/datadog/appsec.rb
ddtrace-1.10.0 lib/datadog/appsec.rb