Sha256: 0ac6f6580f53a8a915f5b05399834f62813efc273c40320ceed920838ca43282

Contents?: true

Size: 687 Bytes

Versions: 2

Compression:

Stored size: 687 Bytes

Contents

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

2 entries across 2 versions & 1 rubygems

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