diff --git a/dash-apm-python/index.json b/dash-apm-python/index.json index 1846743..f7648e0 100644 --- a/dash-apm-python/index.json +++ b/dash-apm-python/index.json @@ -14,6 +14,14 @@ { "title": "Enable trace analytics", "text": "step_3.md" + }, + { + "title": "Enable trace and logs", + "text": "step_4.md" + }, + { + "title": "Enable process agent", + "text": "step_5.md" } ], "intro": { diff --git a/dash-apm-python/step_1.md b/dash-apm-python/step_1.md index 96a9d36..e9f1ece 100644 --- a/dash-apm-python/step_1.md +++ b/dash-apm-python/step_1.md @@ -6,5 +6,3 @@ To get started please be sure you have: - Datadog account login - Datadog API key - -[Datadog APM Dashboard](https://app.datadoghq.com/apm) diff --git a/dash-apm-python/step_2.md b/dash-apm-python/step_2.md index 06613b5..e10828c 100644 --- a/dash-apm-python/step_2.md +++ b/dash-apm-python/step_2.md @@ -1,9 +1,19 @@ -To start all the services run the following, replacing `` with your Datadog API key: +Copy the following command and replace `` with your API key and execute: `export DD_API_KEY=`{{copy}} + +Next, run the following command to start our docker services: + `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 + + +Finally, open APM trace list to ensure traces are being submitted successfully: + +https://app.datadoghq.com/apm/traces + diff --git a/dash-apm-python/step_3.md b/dash-apm-python/step_3.md index 33e61fe..b265668 100644 --- a/dash-apm-python/step_3.md +++ b/dash-apm-python/step_3.md @@ -3,7 +3,21 @@ and `sensors` services in `docker-compose.yml`. `DD_ANALYTICS_ENABLED=true`{{copy}} +Our services should look like: + +``` yaml +frontend: + environment: + - DATADOG_SERVICE_NAME=frontend + - DATADOG_TRACE_AGENT_HOSTNAME=agent + - DD_ANALYTICS_ENABLED=true +``` Afterwards restart docker services: `docker-compose up`{{execute interrupt}} + + +Finally, open trace analytics dashboard: + +https://app.datadoghq.com/apm/search/analytics diff --git a/dash-apm-python/step_4.md b/dash-apm-python/step_4.md new file mode 100644 index 0000000..7c1c18e --- /dev/null +++ b/dash-apm-python/step_4.md @@ -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 diff --git a/dash-apm-python/step_5.md b/dash-apm-python/step_5.md new file mode 100644 index 0000000..1300214 --- /dev/null +++ b/dash-apm-python/step_5.md @@ -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