Module: Datadog::AppSec::Contrib::AutoInstrument

Defined in:
lib/datadog/appsec/contrib/auto_instrument.rb

Overview

Auto-instrumentation for security integrations TODO: this implementation is trivial, check for shareable code with tracer

Class Method Summary collapse

Class Method Details

.patch_allObject



9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/datadog/appsec/contrib/auto_instrument.rb', line 9

def self.patch_all
  integrations = []

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

    integrations << integration.name
  end

  integrations.each do |integration_name|
    Datadog.configuration.appsec.instrument integration_name
  end
end