Browse Source

automatically enable agent settings

master
Brett Langdon 7 years ago
parent
commit
3cb1d97e28
No known key found for this signature in database GPG Key ID: E6600FB894DB3D19
2 changed files with 15 additions and 16 deletions
  1. +12
    -16
      dash-apm-python/step_5.md
  2. +3
    -0
      dash-apm-python/step_5_background.sh

+ 12
- 16
dash-apm-python/step_5.md View File

@ -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


+ 3
- 0
dash-apm-python/step_5_background.sh View File

@ -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

Loading…
Cancel
Save