Sha256: 18479daebdd5363fb7973a0f9cc40deedc6475f706008f745627de55a185861b

Contents?: true

Size: 702 Bytes

Versions: 11

Compression:

Stored size: 702 Bytes

Contents

# typed: true

module Datadog
  module AppSec
    module Contrib
      # Auto-instrumentation for security integrations
      # TODO: this implementation is trivial, check for shareable code with tracer
      module AutoInstrument
        def self.patch_all
          integrations = []

          Datadog::AppSec::Contrib::Integration.registry.each do |_name, integration|
            next unless integration.klass.auto_instrument?

            integrations << integration.name
          end

          Datadog::AppSec.configure do |c|
            integrations.each do |integration_name|
              c.instrument integration_name
            end
          end
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
ddtrace-1.8.0 lib/datadog/appsec/contrib/auto_instrument.rb
ddtrace-1.7.0 lib/datadog/appsec/contrib/auto_instrument.rb
ddtrace-1.6.1 lib/datadog/appsec/contrib/auto_instrument.rb
ddtrace-1.6.0 lib/datadog/appsec/contrib/auto_instrument.rb
ddtrace-1.5.2 lib/datadog/appsec/contrib/auto_instrument.rb
ddtrace-1.5.1 lib/datadog/appsec/contrib/auto_instrument.rb
ddtrace-1.5.0 lib/datadog/appsec/contrib/auto_instrument.rb
ddtrace-1.4.2 lib/datadog/appsec/contrib/auto_instrument.rb
ddtrace-1.4.1 lib/datadog/appsec/contrib/auto_instrument.rb
ddtrace-1.4.0 lib/datadog/appsec/contrib/auto_instrument.rb
ddtrace-1.3.0 lib/datadog/appsec/contrib/auto_instrument.rb