Network Performance Monitoring is now generally available! Network Monitoring is now available!

Enable trace collection in Datadog

To use APM, start by sending your traces to Datadog, and then configure your environment. You can send traces to Datadog in multiple different ways depending on your system setup: including using the Datadog Agent locally, on containers, and several other ways. For the full overview of all of the steps to set up APM, see the APM overview.

Datadog Agent

APM is enabled by default in Agent 6. If you are sending traces from a nonlocal environment (like a container), set apm_non_local_traffic: true in your main datadog.yaml configuration file.

To get an overview of all the possible settings for APM, take a look at the Agent’s datadog.example.yaml configuration file. For all of the metrics sent to Datadog by the Agent, see APM metrics sent by the Datadog Agent. For more information about the Datadog Agent, see the Agent documentation or refer to the datadog.yaml configuration template.


See the specific setup instructions to ensure that the Agent is configured to receive traces in a containerized environment:

Note: After having instrumented your application, the tracing client sends traces to localhost:8126 by default.


AWS Lambda

For more information setting up Lambda - X-Ray, see the Amazon X-Ray integration documentation

Google App Engine, AAS

Datadog APM requires sending trace data to a running Agent. A workaround for enabling trace collection for a serverless setup is to configure a separate VM that accepts trace traffic externally.

Additional environments

There are alternatives to the Agent and containers that you can use to collect traces.


Tracing is enabled by default when monitoring with Heroku. For more information about configuring tracing for Heroku, see the Heroku cloud documentation.

Cloud Foundry

Tracing is enabled by default when monitoring with Cloud Foundry. For more information about configuring tracing for Cloud Foundry, see the Cloud Foundry documentation.

Configure your environment

There are several ways to specify an environment when reporting data:

  1. Host tag: Use a host tag with the format env:<ENVIRONMENT> to tag all traces from that Agent accordingly.
  2. Agent configuration: Override the default tag used by the Agent in the Agent configuration file. This tags all traces coming through the Agent, overriding the host tag value.

    env: <ENVIRONMENT>
  3. Per trace: When submitting a single trace, specify an environment by tagging one of its spans with the metadata key env. This overrides the Agent configuration and the host tag’s value (if any). Consult the trace tagging documentation to learn how to assign a tag to your traces.

Next steps

Next, Instrument your application. For the full overview of all of the steps to set up APM, see the APM overview.

Further Reading