- Essentials
- In The App
- Infrastructure
- Application Performance
- Log Management
- Security Platform
- UX Monitoring
- Administration
After you set up the tracing library with your code and configure the Agent to collect APM data, optionally configure the tracing library as desired, including setting up Unified Service Tagging.
When using ddtrace-run, the following environment variable options can be used:
DD_TRACE_DEBUG
false
DD_PATCH_MODULES
DD_PATCH_MODULES=module:patch,module:patch...
It is recommended to use DD_ENV
, DD_SERVICE
, and DD_VERSION
to set env
, service
, and version
for your services. Refer to the Unified Service Tagging documentation for recommendations on how to configure these environment variables.
DD_ENV
prod
, pre-prod
, staging
. Learn more about how to setup your environment. Available in version 0.38+.DD_SERVICE
DD_PROPAGATION_STYLE_INJECT
Datadog
DD_PROPAGATION_STYLE_INJECT=Datadog,B3
to inject both Datadog and B3 format headers.DD_PROPAGATION_STYLE_EXTRACT
DD_PROPAGATION_STYLE_INJECT
(Datadog
)DD_PROPAGATION_STYLE_EXTRACT=B3,Datadog
produces the same behavior as DD_PROPAGATION_STYLE_EXTRACT=Datadog,B3
.DD_SERVICE_MAPPING
postgres:postgresql,defaultdb:postgresql
. Available in version 0.47+.DD_VERSION
1.2.3
, 6c44da20
, 2020.02.13
. Available in version 0.38+.DD_TRACE_SAMPLE_RATE
DD_TRACE_RATE_LIMIT
100
when DD_TRACE_SAMPLE_RATE
is set. Otherwise, delegates rate limiting to the Datadog Agent.DD_TAGS
layer:api,team:intake
. Available in version 0.38+.DD_TRACE_HEADER_TAGS
null
DD_TRACE_HEADER_TAGS="User-Agent:http.user_agent,Referer:http.referer,Content-Type:http.content_type,Etag:http.etag"
.DD_TRACE_ENABLED
true
false
, the application code doesn’t generate any traces.DD_AGENT_HOST
localhost
DD_AGENT_PORT
8126
DD_TRACE_AGENT_URL
apm_config.receiver_socket
configuration in your datadog.yaml
file or the DD_APM_RECEIVER_SOCKET
environment variable set on the Datadog Agent. For example, DD_TRACE_AGENT_URL=http://localhost:8126
for HTTP URL and DD_TRACE_AGENT_URL=unix:///var/run/datadog/apm.socket
for UDS.DD_DOGSTATSD_URL
dogstatsd_socket
configuration in your datadog.yaml
file or the DD_DOGSTATSD_SOCKET
environment variable set on the Datadog Agent. For example, DD_DOGSTATSD_URL=udp://localhost:8126
for UDP URL and DD_DOGSTATSD_URL=unix:///var/run/datadog/dsd.socket
for UDS.DD_DOGSTATSD_HOST
localhost
DD_AGENT_HOST
to override DD_DOGSTATSD_HOST
.DD_DOGSTATSD_PORT
8126
DD_LOGS_INJECTION
false
Additional helpful documentation, links, and articles: