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.
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:
For more information setting up Lambda - X-Ray, see the Amazon X-Ray integration documentation
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.
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.
Tracing is enabled by default when monitoring with Cloud Foundry. For more information about configuring tracing for Cloud Foundry, see the Cloud Foundry documentation.
There are several ways to specify an environment when reporting data:
env:<ENVIRONMENT>to tag all traces from that Agent accordingly.
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.
apm_config: env: <ENVIRONMENT>
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.
Additional helpful documentation, links, and articles: