This page is not yet available in Spanish. We are working on its translation. If you have any questions or feedback about our current translation project, feel free to reach out to us!
As of Agent 6.0.0, the Trace Agent is enabled by default. If it has been turned off, you can re-enable it in the gcr.io/datadoghq/agent container by passing DD_APM_ENABLED=true as an environment variable.
The CLI commands on this page are for the Docker runtime. Replace docker with nerdctl for the containerd runtime, or podman for the Podman runtime.
If you are collecting traces from a containerized app (your Agent and app running in separate containers), as an alternative to the following instructions, you can automatically inject the tracing library into your application. Read Injecting Libraries for instructions.
optional - string Your Datadog site. Set this to datadoghq.com. Default: datadoghq.com
DD_APM_ENABLED
optional - Boolean - default: true When set to true (default), the Datadog Agent accepts traces and trace metrics.
DD_APM_RECEIVER_PORT
optional - integer - default: 8126 Sets the port on which the Datadog Agent’s trace receiver listens. Set to 0 to disable the HTTP receiver.
DD_APM_RECEIVER_SOCKET
optional - string To collect your traces through UNIX Domain Sockets, provide the path to the UNIX socket. If set, this takes priority over hostname and port configuration, and must point to a valid socket file.
DD_APM_NON_LOCAL_TRAFFIC
optional - Boolean - default: false When set to true, the Datadog Agent listens to non-local traffic. If you are tracing from other containers, set this environment variable to true.
DD_APM_DD_URL
optional - string To use a proxy for APM, provide the endpoint and port as <ENDPOINT>:<PORT>. The proxy must be able to handle TCP connections.
DD_APM_CONNECTION_LIMIT
required - integer - default: 2000 Sets the maximum APM connections for a 30 second time window. See Agent Rate Limits for more details.
DD_APM_IGNORE_RESOURCES
optional - [string] Provides an exclusion list of resources for the Datadog Agent to ignore. If a trace’s resource name matches one or more of the regular expressions on this list, the trace is not sent to Datadog. Example: "GET /ignore-me","(GET\|POST) and-also-me".
DD_APM_FILTER_TAGS_REQUIRE
optional - object Defines rules for tag-based trace filtering. To be sent to Datadog, traces must have these tags. See Ignoring Unwanted Resources in APM.
DD_APM_FILTER_TAGS_REGEX_REQUIRE
optional - object Supported in Agent 7.49+. Defines rules for tag-based trace filtering with regular expressions. To be sent to Datadog, traces must have tags that match these regex patterns.
DD_APM_FILTER_TAGS_REJECT
optional - object Defines rules for tag-based trace filtering. If a trace has these tags, it is not sent to Datadog. See Ignoring Unwanted Resources in APM for more details.
DD_APM_FILTER_TAGS_REGEX_REJECT
optional - object Supported in Agent 7.49+. Defines rules for tag-based trace filtering with regular expressions. If a trace has tags that match these regex patterns, the trace is not sent to Datadog.
optional - string - default: automatically detected Sets the hostname to use for metrics if automatic hostname detection fails, or when running the Datadog Cluster Agent.
DD_DOGSTATSD_PORT
optional - integer - default: 8125 Sets the DogStatsD port.
DD_PROXY_HTTPS
optional - string To use a proxy to connect to the internet, provide the URL.
DD_BIND_HOST
optional - string - default: localhost Sets the host to listen on for DogStatsD and traces.
DD_LOG_LEVEL
optional - string - default: info Sets the minimum logging level. Valid options: trace, debug, info, warn, error, critical, and off.
Where your <DATADOG_SITE> is datadoghq.com (defaults to datadoghq.com).
This exposes the hostname datadog-agent in your app container.
If you’re using docker-compose, <NETWORK_NAME> parameters are the ones defined under the networks section of your docker-compose.yml.
Your application tracers must be configured to submit traces to this address. Set environment variables with the DD_AGENT_HOST as the Agent container name, and DD_TRACE_AGENT_PORT as the Agent Trace port in your application containers. The example above uses host datadog-agent and port 8126 (the default value so you don’t have to set it).
Alternately, see the examples below to set the Agent host manually in each supported language:
Agent container port 8126 should be linked to the host directly.
Configure your application tracer to report to the default route of this container (determine this using the ip route command).
The following is an example for the Python Tracer, assuming 172.17.0.1 is the default route: