Difficulty: Beginner
Estimated Time: 10 minutes

In this hands-on section we will enable Application Performance Monitoring in Datadog to work with Kubernetes. Like the logs section, this is not intended to get you up to speed on APM, but rather to show whats special about doing it on Kubernetes. To learn more about APM, refer to the Introduction to APM course on this platform.

Working with Logs in Kubernetes

  1. Once your environment is up and running, log into the Datadog application. Verify that metrics from the environment are coming in to the platform.

  2. Navigate to APM in the Datadog application. If the feature hasn't been enabled, click the Get Started button .

  3. On the next page you will see the instructions for getting your traces into Datadog. We already have a Datadog yaml file, but we need to configure everything to start collecting traces.

  4. Open the datadog-agent.yaml file in the editor to the right. Scroll down to the envsection. Add the following:

    - name: DD_APM_ENABLED
      value: "true"
    - name: DD_APM_NON_LOCAL_TRAFFIC
      value: "true"
    

    You need to make sure the indent level is correct. All of the - name: keys under env: should be at the same level.

  5. Apply your new datadog-agent yaml file: kubectl apply -f k8s-yaml-files/datadog-agent.yaml

    Note that this is applying without first deleting due to the updateStrategy being set to RollingUpdate. Also, if there are any errors with indentation, the command will give you feedback about what needs to be fixed.

  1. Now configure the front-end service to start collecting traces

  2. Return to Logs in the Datadog application and you should see logs starting to appear.

We will look at enabling logs for specific integrations in a later section.