Enable ASM by enabling the APM tracer. The following options describe a quick setup that covers the most common cases. Read the Ruby tracer documentation for more details.
# config/initializers/datadog.rbrequire'datadog/appsec'Datadog.configuredo|c|# the APM tracer is enabled by auto-instrumentation# enable ASMc.appsec.enabled=truec.appsec.instrument:railsend
Enable the APM tracer by adding the following to your application’s startup:
require'sinatra'require'datadog'require'datadog/appsec'Datadog.configuredo|c|# enable the APM tracerc.tracing.instrument:sinatra# enable ASM for Sinatrac.appsec.enabled=truec.appsec.instrument:sinatraend
Or enable the APM tracer through auto-instrumentation:
require'sinatra'require'datadog/auto_instrument'Datadog.configuredo|c|# the APM tracer is enabled by auto-instrumentation# enable ASM for Sinatrac.appsec.enabled=truec.appsec.instrument:sinatraend
Enable the APM tracer by adding the following to your config.ru file:
require'datadog'require'datadog/appsec'Datadog.configuredo|c|# enable the APM tracerc.tracing.instrument:rack# enable ASM for Rackc.appsec.enabled=truec.appsec.instrument:rackenduseDatadog::Tracing::Contrib::Rack::TraceMiddlewareuseDatadog::AppSec::Contrib::Rack::RequestMiddleware
Or one of the following methods, depending on where your application runs:
for ((i=1;i<=250;i++)); do # Target existing service’s routes curl https://your-application-url/existing-route -A dd-test-scanner-log; # Target non existing service’s routes curl https://your-application-url/non-existing-route -A dd-test-scanner-log; done