Datadog SDK Environment Variables
1. Datadog SDK Environment Variables
The Datadog SDK uses the following environment variables by default.
| Environment Variable | Purpose | Default |
|---|---|---|
DD_ENV | Specifies the operating environment such as Alpha, Prod | null |
DD_SERVICE | Specifies the Application Service name | Auto Detection |
DD_VERSION | Specifies the Application Version | null |
DD_AGENT_HOST | Specifies the IP of DataDog Agent | localhost |
DD_TRACE_AGENT_PORT | Specifies the Trace Port of DataDog Agent | 8126 TCP Port |
DD_TRACE_AGENT_URL | Specifies the Trace URL of DataDog Agent | Uses unix:///var/run/datadog/apm.socket if available, otherwise uses http://localhost:8126 |
DD_DOGSTATSD_PORT | Specifies the DogStatsD Port of DataDog Agent | 8125 UDP Port |
DD_DOGSTATSD_URL | Specifies the DogStatsD URL of DataDog Agent | Uses unix:///var/run/datadog/dsd.socket if available, otherwise uses udp://localhost:8125 |
- The priority of the
DD_TRACE_AGENT_URLenvironment variable is higher than the priority of theDD_AGENT_HOSTandDD_TRACE_AGENT_PORTenvironment variables. - The priority of the
DD_DOGSTATSD_URLenvironment variable is higher than the priority of theDD_DOGSTATSD_PORTenvironment variable.
1.1. DD Trace SDK Environment Variable Support Status
DD Trace SDKs that support Trace collection support the following environment variables.
1.2. DogStatsD SDK Environment Variable Support Status
DogStatsD SDKs that support Metric collection support the following environment variables.