diff --git a/dash-apm-python/step_5.md b/dash-apm-python/step_5.md index 28872e1..8adfff8 100644 --- a/dash-apm-python/step_5.md +++ b/dash-apm-python/step_5.md @@ -1,21 +1,17 @@ # Enable Datadog logs agent -Add the following environment variables to the `agent` service in `docker-compose.yml`. - -`DD_LOGS_ENABLED=true`{{copy}} -`DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL=true`{{copy}} - -Our service should look like: - -```yaml -agent: - environment: - - DD_API_KEY - - DD_APM_ENABLED=true - - DD_TAGS='env:apm-workshop' - - DD_LOGS_ENABLED=true - - DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL=true -```{{copy}} +To enable logs collection we need to enable the logs agent in the Datadog agent. + +To do so you can set the following environment variables: + +``` +DD_LOGS_ENABLED=true +DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL=true +``` + +We have set these environment variables for you automatically. + +These settings enable the logs agent and tells it to collect logs from all docker containers it finds. # Enable trace id injection into logs diff --git a/dash-apm-python/step_5_background.sh b/dash-apm-python/step_5_background.sh index 2a8d8e9..95de91b 100644 --- a/dash-apm-python/step_5_background.sh +++ b/dash-apm-python/step_5_background.sh @@ -1,3 +1,6 @@ #!/usr/bin/env bash +echo "DD_LOGS_ENABLED=true" >> /tracing-workshop/.env-agent +echo "DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL=true" >> /tracing-workshop/.env-agent + echo "DD_LOGS_INTEGRATION=true" >> /tracing-workshop/.env