Logging is here!

APM Setup

This documentation covers Agent v6 only, to know how to set up APM tracing with Agent v5, refer to the dedicated APM with Agent v5 doc.

Setup process

With our infrastructure monitoring, metrics are sent to the Agent, which then forwards them to Datadog. Similarly, tracing metrics are also sent to the Agent: the application code instrumentation flushes to the Agent every 1 s (see here for the Python client for instance) and the Agent flushes to the Datadog API every 10s.

To start tracing your application:

  1. Install the Datadog Agent: Install and configure the latest Datadog Agent. For additional information, reference the getting started guide.

  2. Install the Trace Agent:

  3. Configure your environment: An environment is a first class dimension used to scope a whole Datadog APM application. A common use case is to disaggregate metrics from stage environments such as production, staging, and pre-production. Learn how to configure environments. Note: if you do not configure your own environments, all data will default to env:none.

  4. Instrument your application: Select one of the following supported languages:

    To instrument an application written in a language that does not yet have official library support, visit our list of community tracing libraries.

  5. Start monitoring your app’s performance: Within a few minutes of running APM, you will start to see your services appear in the APM home page. See Using the APM UI to learn more.

Agent configuration

The APM Agent (also known as trace Agent) is shipped by default with the Agent 6 in the Linux, MacOS, and Windows packages. The APM Agent is enabled by default on Linux. To enable the check on other platforms or disable it on Linux, update the apm_config key in your datadog.yaml:

apm_config:
  enabled: true
File setting Environment variable Description
main
apm_enabled DD_APM_ENABLED The Datadog Agent accepts trace metrics when the value is set to true. The default value is true.
trace.sampler
extra_sample_rate - Use this setting to adjust the trace sample rate. The value should be a float between 0 (no sampling) and 1 (normal sampling). The default value is 1.
max_traces_per_second - The maximum number of traces to sample per second. To disable the limit (not recommended), set to 0. The default value is 10.
trace.receiver
receiver_port DD_RECEIVER_PORT The port that the Datadog Agent’s trace receiver should listen on. The default value is 8126.
connection_limit - The number of unique client connections to allow during one 30 second lease period. The default value is 2000.
trace.ignore
resource DD_IGNORE_RESOURCE A blacklist of regular expressions to filter out Traces by their resource name.

For more information about the Datadog Agent, see the dedicated doc page or refer to the datadog.conf.example file.

Reference the dedicated documentation to setup tracing with Docker.

Further Reading