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.
With Datadog’s 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 second (see here for the Python client for instance) and the Agent flushes to the Datadog API every 10 seconds.
To start tracing your application:
Install the Datadog Agent: Install and configure the latest Datadog Agent. (On macOS, install and run the Trace Agent in addition to the Datadog Agent. See the macOS Trace Agent documentation for more information).
Enable trace collection for the Datadog Agent. See below dedicated instructions.
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
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 the list of community tracing libraries.
To enable trace collection for your Agent, update the
apm_config key in your Agent
datadog.yaml main configuration file:
apm_config: enabled: true
Find below the list of all available parameters for your
datadog.yaml configuration file:
||boolean||When set to
||string||Datadog API endpoint where traces are sent.|
||string||Default environment to which traces should be registered under (e.g. staging, production, etc..).|
||float||Use this setting to adjust the trace sample rate. The value should be a float between
||float||Maximum number of traces to sample per second. Set to
||list||A list of resources that the Agent should ignore.|
||string||Location of the log file.|
||list||A list of tag replacement rules. See the Scrubbing sensitive information section.|
||number||Port that the Datadog Agent’s trace receiver listen on. Default value is
||boolean||Allows the Agent to receive outside connections. It then listen on all interfaces.|
||float||Maximum memory that the Agent is allowed to occupy. When this is exceeded the process is killed.|
||float||Maximum CPU percentage that the Agent should use. The Agent automatically adjusts its pre-sampling rate to stay below this number.|
To get a an overview of all the possible settings for APM, take a look at the Agent’s
datadog.example.yaml configuration file.
For more information about the Datadog Agent, see the dedicated doc page or refer to the