Configuration¶
ddtrace can be configured using environment variables. They are listed below:
Variable Name |
Type |
Default value |
Description |
---|---|---|---|
|
String |
Set an application’s environment e.g. |
|
|
String |
(autodetected) |
Set the service name to be used for this application. A default is
provided for these integrations: Bottle, Flask, Grpc,
Pyramid, Pylons, Tornado, Celery, Django and
Falcon. Added in |
|
String |
Define service name mappings to allow renaming services in traces, e.g. |
|
|
String |
Set global tags to be attached to every span. Value must be either comma or space separated. e.g. |
|
|
String |
Set an application’s version in traces and logs e.g. |
|
|
String |
datadoghq.com |
Specify which site to use for uploading profiles. Set to
|
|
Boolean |
True |
Enable sending of spans to the Agent. Note that instrumentation will still be installed and spans will be
generated. Added in |
|
Boolean |
True |
Enables sending telemetry events to the agent. |
|
Boolean |
False |
Enables debug logging in the tracer. Setting this flag will cause the library to create a root logging handler if one does not already exist. Added in |
|
String |
DEBUG |
Configures the |
|
String |
None |
Directs ddtrace logs to a specific file. Note: The default backup count is 1. For larger logs, use with |
|
Int |
15728640 |
Max size for a file when used with DD_TRACE_LOG_FILE. When a log has exceeded this size, there will be one backup log file created. In total, the files will store |
|
Boolean |
True |
Enables <INTEGRATION> to be patched. For example, |
|
String |
Override the modules patched for this execution of the program. Must be
a list in the |
|
|
Boolean |
False |
Enables Logs Injection. |
|
Boolean |
False |
Controls whether |
|
URL |
|
The URL to use to connect the Datadog agent for traces. The url can start with
|
|
URL |
|
The URL to use to connect the Datadog agent for Dogstatsd metrics. The url can start with
|
|
Float |
2.0 |
The timeout in float to use to connect to the Datadog agent. |
|
Int |
8388608 |
The max size in bytes of traces to buffer between flushes to the agent. |
|
Int |
8388608 |
The max size in bytes of each payload item sent to the trace agent. If the max payload size is greater than buffer size, then max size of each payload item will be the buffer size. |
|
Float |
1.0 |
The time between each flush of traces to the trace agent. |
|
Boolean |
False |
Enable or disable start up diagnostic logging. |
|
Float |
1.0 |
A float, f, 0.0 <= f <= 1.0. f*100% of traces will be sampled. |
|
JSON array |
A JSON array of objects. Each object must have a “sample_rate”, and the “name” and “service” fields are optional. The “sample_rate” value must be between 0.0 and 1.0 (inclusive).
Example: |
|
|
String |
A map of case-insensitive header keys to tag names. Automatically applies matching header values as tags on root spans.
For example, |
|
|
String |
|
The trace API version to use when sending traces to the Datadog agent.
Currently, the supported versions are: |
|
String |
|
A regexp to redact sensitive query strings. Obfuscation disabled if set to empty string |
|
String |
|
Comma separated list of propagation styles used for extracting trace context from inbound request headers. The supported values are When checking inbound request headers we will take the first valid trace context in the order Example: |
|
String |
|
Comma separated list of propagation styles used for injecting trace context into outbound request headers. The supported values are All provided styles are injected into the headers of outbound requests. Example: |
|
Integer |
512 |
The maximum length of |
|
Boolean |
True |
Prevents large payloads being sent to APM. |
|
Boolean |
False |
Enable Datadog profiling when using |
|
Float |
10 |
The timeout in seconds before dropping events if the HTTP API does not reply. |
|
Float |
1 |
The percentage of maximum time the stack profiler can use when computing statistics. Must be greater than 0 and lesser or equal to 100. |
|
Integer |
64 |
The maximum number of frames to capture in stack execution tracing. |
|
Boolean |
False |
Whether to enable code provenance. |
|
Boolean |
True |
Whether to enable the memory profiler. |
|
Boolean |
True |
Whether to enable the heap memory profiler. |
|
Float |
1 |
The percentage of events that should be captured (e.g. memory allocation). Greater values reduce the program execution speed. Must be greater than 0 lesser or equal to 100. |
|
Float |
60 |
The interval in seconds to wait before flushing out recorded events. |
|
Boolean |
False |
Deprecated: whether to ignore the profiler in the generated data. |
|
String |
The tags to apply to uploaded profile. Must be a list in the
|
|
|
Boolean |
True |
Whether to enable the endpoint data collection in profiles. |
|
Boolean |
False |
Whether to enable AppSec monitoring. |
|
String |
Path to a json file containing AppSec rules. |
|
|
Boolean |
False |
Compile Cython extensions in RelWithDebInfo mode (with debug info, but no debug code or asserts) |
|
String |
|
Sensitive parameter key regexp for obfuscation. |
|
String |
|
Sensitive parameter value regexp for obfuscation. |
Dynamic Instrumentation¶
Variable Name |
Type |
Default Value |
Description |
---|---|---|---|
|
Integer |
3600 |
Interval in seconds for periodically sending probe diagnostic messages. |
|
Boolean |
False |
Enable the debugger. |
|
Integer |
1048576 |
Maximum size in bytes of a single configuration payload that can be handled per request. |
|
Boolean |
True |
Enable diagnostic metrics. |
|
Float |
1.0 |
Interval in seconds for flushing the snapshot upload queue. |
|
Integer |
30 |
Timeout in seconds for uploading a snapshot. |