Update your configuration container for APM by adding the following arguments in your docker run
command:
docker run [...] -e DD_APPSEC_ENABLED=true -e DD_APM_TRACING_ENABLED=false [...]
Add the following environment variable values to your container Dockerfile:
ENV DD_APPSEC_ENABLED=true
ENV DD_APM_TRACING_ENABLED=false
Update your deployment configuration file for APM and add the Application & API Protection environment variables:
spec:
template:
spec:
containers:
- name: <CONTAINER_NAME>
image: <CONTAINER_IMAGE>/<TAG>
env:
- name: DD_APPSEC_ENABLED
value: "true"
- name: DD_APM_TRACING_ENABLED
value: "false"
Update your ECS task definition JSON file, by adding these in the environment section:
"environment": [
...,
{
"name": "DD_APPSEC_ENABLED",
"value": "true"
},
{
"name": "DD_APM_TRACING_ENABLED",
"value": "false"
}
]
Set the appropriate flags or environment variables in your service invocation:
java -javaagent:dd-java-agent.jar \
-Ddd.appsec.enabled=true \
-Ddd.trace.enabled=false \
-jar <YOUR_SERVICE>.jar \
<YOUR_SERVICE_FLAGS>