| @ -1,9 +1,19 @@ | |||||
| To start all the services run the following, replacing `<KEY>` with your Datadog API key: | |||||
| Copy the following command and replace `<KEY>` with your API key and execute: | |||||
| `export DD_API_KEY=<KEY>`{{copy}} | `export DD_API_KEY=<KEY>`{{copy}} | ||||
| Next, run the following command to start our docker services: | |||||
| `docker-compose up`{{execute}} | `docker-compose up`{{execute}} | ||||
| Open the web interface to verify the application is up and running: | |||||
| Next, open the web interface to verify the application is up and running: | |||||
| https://[[HOST_SUBDOMAIN]]-5000-[[KATACODA_HOST]].environments.katacoda.com | https://[[HOST_SUBDOMAIN]]-5000-[[KATACODA_HOST]].environments.katacoda.com | ||||
| Finally, open APM trace list to ensure traces are being submitted successfully: | |||||
| https://app.datadoghq.com/apm/traces | |||||
| @ -0,0 +1,44 @@ | |||||
| # 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 | |||||
| ``` | |||||
| # Enable trace id injection into logs | |||||
| Add the following environment variable to the `frontend`, `node`, `pumps`, | |||||
| and `sensors` services in `docker-compose.yml`. | |||||
| `DD_LOGS_INTEGRATION=true`{{copy}} | |||||
| Our services should look like: | |||||
| ```yaml | |||||
| frontend: | |||||
| environment: | |||||
| - DATADOG_SERVICE_NAME=frontend | |||||
| - DATADOG_TRACE_AGENT_HOSTNAME=agent | |||||
| - DD_ANALYTICS_ENABLED=true | |||||
| - DD_LOGS_INTEGRATION=true | |||||
| ``` | |||||
| Afterwards restart docker services: | |||||
| `docker-compose up`{{execute interrupt}} | |||||
| Finally, open logs dashboard: | |||||
| https://app.datadoghq.com/logs | |||||
| @ -0,0 +1,25 @@ | |||||
| To enable the Datadog process agent add the following environment variable | |||||
| to the `agent` service. | |||||
| `DD_PROCESS_AGENT_ENABLED=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 | |||||
| - DD_PROCESS_AGENT_ENABLED=true | |||||
| ``` | |||||
| Next, restart our docker services: | |||||
| `docker-compose up`{{execute interrupt}} | |||||
| Finally, open the process dashboard: | |||||
| https://app.datadoghq.com/process | |||||