Sha256: f2103f323b383657bbbbc52a7441804dca10ad4dd9c131b8769f3cf56dfed6f8

Contents?: true

Size: 704 Bytes

Versions: 1

Compression:

Stored size: 704 Bytes

Contents

# typed: ignore

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

1 entries across 1 versions & 1 rubygems

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