Configuring the .NET Framework SDK
After you set up the SDK with your code and configure the Agent to collect APM data, optionally configure the SDK as desired, including setting up Unified Service Tagging.
To verify your runtime configuration and confirm settings, view the current configuration of your service in Datadog. Navigate to the APM Service Page, click Service Config, and select the SDK Configuration tab.
You can set configuration settings in the .NET Tracer with any of the following methods:
To configure the SDK using environment variables, set the variables before launching the instrumented application. To learn how to set environment variables in different environments, see Configuring process environment variables.
To configure the Tracer in application code, create a TracerSettings instance from the default configuration sources. Set properties on this TracerSettings instance before calling Tracer.Configure(). For example:
Settings must be set on TracerSettings before creating the Tracer. Changes made to TracerSettings properties after the Tracer is created are ignored.
using Datadog.Trace;
using Datadog.Trace.Configuration;
// read default configuration sources (env vars, web.config, datadog.json)
var settings = TracerSettings.FromDefaultSources();
// change some settings
settings.Environment = "prod";
settings.ServiceName = "MyService";
settings.ServiceVersion = "abc123";
// In v2 of Datadog.Trace, use settings.Exporter.AgentUri
settings.AgentUri = new Uri("http://localhost:8126/");
// configure the global Tracer settings
Tracer.Configure(settings);
To configure the Tracer using an app.config or web.config file, use the <appSettings> section. For example:
<configuration>
<appSettings>
<add key="DD_TRACE_AGENT_URL" value="http://localhost:8126"/>
<add key="DD_ENV" value="prod"/>
<add key="DD_SERVICE" value="MyService"/>
<add key="DD_VERSION" value="abc123"/>
</appSettings>
</configuration>
To configure the Tracer using a JSON file, create datadog.json in the instrumented application’s directory. The root JSON object must be an object with a key-value pair for each setting. For example:
{
"DD_TRACE_AGENT_URL": "http://localhost:8126",
"DD_ENV": "prod",
"DD_SERVICE": "MyService",
"DD_VERSION": "abc123",
}
Configuration keys
302 configuration keys available for this library.
Top-level Datadog configuration: API keys, service identity, Agent connection, intake site, hostname, global tags, and proxy settings.
DD_AGENT_HOST
- Type:
string
Default: localhost
Aliases:DD_TRACE_AGENT_HOSTNAME, DATADOG_TRACE_AGENT_HOSTNAME
The host name to use to connect the Datadog agent for traces. The host name can be IPv4, IPv6, or a domain name. If DD_TRACE_AGENT_URL is specified, the value of DD_AGENT_HOST is ignored. DD_API_KEY
- Type:
string
Aliases:DATADOG_API_KEY
Sets the Datadog API key used to authenticate outbound requests when running in agentless mode (sending data directly to Datadog without a local Agent). Required for agentless CI test reporting and LLM Observability agentless mode. DD_APM_RECEIVER_PORT
- Type:
int
Default: 8126
Used to force a specific port binding for the Trace Agent. Default value is 8126. DD_APM_TRACING_ENABLED
- Type:
boolean
Default: true
Aliases:DD_TRACING_ENABLED
Enables or disables sending APM trace data. When disabled, tracing still runs to support other products, but only periodic heartbeat traces and manually kept traces are sent. DD_ENV
- Type:
string
The application’s environment. Sets the “env” tag on every span. DD_HOSTNAME
- Type:
string
Since: v3.47.0
Overrides the hostname used for tagging and telemetry when hostname auto-detection is unreliable. The value must be a valid hostname; invalid values are ignored and hostname auto-detection is used instead. DD_PROFILER_EXCLUDE_PROCESSES
- Type:
string
Since: v3.47.0
Semicolon-separated list of process executable names that the Datadog SDK (CLR profiler / auto-instrumentation) will not attach to. DD_PROFILER_PROCESSES
- Type:
string
Since: v3.47.0
Semicolon-separated list of process executable names that the Datadog SDK (CLR profiler / auto-instrumentation) will attach to. If set, only matching processes are instrumented; all others are skipped. DD_PROXY_HTTPS
- Type:
string
Configuration key to set a proxy server for https requests for CI Visibility DD_PROXY_NO_PROXY
- Type:
string
Configuration key to set a list of hosts that should bypass the proxy. The list is space-separated. For CI Visibility only DD_SERVICE
- Type:
string
Aliases:DD_SERVICE_NAME, OTEL_SERVICE_NAME
Sets the service name used as the service tag on every span. If not specified, the SDK tries to determine the service name automatically.
Language-specific notes:
- .NET: falls back to the IIS application name, process entry assembly, or process name.
- Java: falls back to the Java agent’s auto-detected service name based on the application class.
- Node.js: falls back to the
name field in package.json.
DD_SITE
- Type:
string
Default: datadoghq.com
Sets the site domain used to build agentless intake URLs. If unset, a default site is used. DD_TAGS
- Type:
map
Aliases:DD_TRACE_GLOBAL_TAGS
Custom tags applied to traces, provided as comma-separated key:value pairs (e.g. layer:api,team:intake). DD_TRACE_CONFIG_FILE
- Type:
string
Default: datadog.json
Aliases:DD_DOTNET_TRACER_CONFIG_FILE
Path to the configuration file. Can only be set with an environment variable or in the app.config/web.config file. DD_VERSION
- Type:
string
Your application version, set as the version tag on traces.
Core distributed tracing engine: Agent connection, trace and span ID generation, span lifecycle management, peer service mapping, resource normalization, query string obfuscation, and DB client configuration.
DD_APM_RECEIVER_SOCKET
- Type:
string
Unix domain socket where the Tracer can send traces. Default value is null. DD_HTTP_CLIENT_ERROR_STATUSES
- Type:
string
Default: 400-499
Client HTTP status codes that mark spans as errors. DD_HTTP_SERVER_ERROR_STATUSES
- Type:
string
Default: 500-599
Server HTTP status codes that mark spans as errors. DD_TRACE_128_BIT_TRACEID_GENERATION_ENABLED
- Type:
boolean
Default: true
Controls whether the tracer generates 128-bit W3C trace IDs (32-character hex) or 64-bit Datadog trace IDs (16-character hex). 128-bit IDs are required for full W3C traceparent interoperability. DD_TRACE_128_BIT_TRACEID_LOGGING_ENABLED
- Type:
boolean
Default: true
Controls whether 128-bit trace IDs are logged in their full 32-character format or truncated to 16 characters. Set to false for compatibility with systems that expect the shorter format. DD_TRACE_AGENT_ARGS
- Type:
string
Azure App Services: extra command-line arguments for launching the external trace-agent process (whitespace/comma-separated). If unset, no extra args are passed. DD_TRACE_AGENT_PATH
- Type:
string
Azure App Services: path to the external trace-agent executable to launch. If unset, the tracer will not start the external trace-agent process. DD_TRACE_AGENT_PORT
- Type:
int
Default: 8126
Aliases:DATADOG_TRACE_AGENT_PORT
The port of the Trace Agent that the tracer submits to. If the Agent configuration sets receiver_port or DD_APM_RECEIVER_PORT to something other than the default 8126, then DD_TRACE_AGENT_PORT or DD_TRACE_AGENT_URL must match it. DD_TRACE_AGENT_URL
- Type:
string
Default: http://localhost:8126
The URL for connecting the tracer to the Datadog agent. Valid URL schemas include http:// and unix:// (UNIX Domain Sockets). This value takes precedence over DD_AGENT_HOST and DD_TRACE_AGENT_PORT if set. DD_TRACE_ANALYTICS_ENABLED
- Type:
boolean
Default: false
Enables the legacy Trace Analytics feature for all integrations by setting the analytics.sample_rate metric on spans using each integration’s configured analytics sample rate. Superseded by App Analytics in newer Datadog deployments. DD_TRACE_BATCH_INTERVAL
- Type:
int
Default: 100
Sets the batch interval in milliseconds for the serialization queue. Set to 0 to disable. DD_TRACE_BUFFER_SIZE
- Type:
int
Default: 10485760
Internal dd-trace-dotnet span buffer configuration. Sets the size in bytes of the trace buffer. DD_TRACE_CLIENT_IP_ENABLED
- Type:
boolean
Default: false
Enables or disables the automatic collection of client IP addresses from HTTP request headers. When enabled, the IP address is stored in the http.client_ip span tag. - Type:
string
Aliases:DD_APPSEC_IPHEADER
Configures a custom header name from which to source the http.client_ip tag value. If this variable is set, all other IP-related headers are ignored (for example, setting DD_TRACE_CLIENT_IP_HEADER=custom-ip-header and including the header custom-ip-header: 5.6.7.9 in a request results in a span tagged with “http.client_ip”: “5.6.7.9”). If an empty string or null value is passed, IP headers are queried in this order: - x-forwarded-for - x-real-ip - true-client-ip - x-client-ip - x-forwarded - forwarded-for - x-cluster-client-ip - fastly-client-ip - cf-connecting-ip - cf-connecting-ipv6 DD_TRACE_ENABLED
- Type:
boolean
Default: true
Aliases:DD_TRACING_ENABLED
Enable framework and library instrumentation. When false, the application code doesn’t generate any traces. See also DD_APM_TRACING_ENABLED. DD_TRACE_EXPERIMENTAL_FEATURES_ENABLED
- Type:
string
Configuration key to enable experimental features. DD_TRACE_METHODS
- Type:
string
Enables automatic instrumentation on specified methods. Accepts a semicolon-separated (;) list where each entry has the format Namespace.TypeName[MethodNames], where MethodNames is either a comma-separated (,) list of method names or the * wildcard.
For generic types, replace the angled brackets and the type parameters’ names with a backtick (`) followed by the number of generic type parameters. For example, Dictionary<TKey, TValue> must be written as Dictionary`2. For generic methods, only specify the method name.
Example: Namespace1.Class1[Method1,GenericMethod];Namespace1.GenericTypeWithOneTypeVariable`1[ExecuteAsync];Namespace2.Class2[*]
Note: The wildcard method support ([*]) selects all methods in a type except constructors, property getters and setters, Equals, Finalize, GetHashCode, and ToString.
DD_TRACE_OBFUSCATION_QUERY_STRING_REGEXP
- Type:
string
Default: (?:(?:\"|%22)?)(?:(?:old[-_]?|new[-_]?)?p(?:ass)?w(?:or)?d(?:1|2)?|pass(?:[-_]?phrase)?|secret|(?:api[-_]?|private[-_]?|public[-_]?|access[-_]?|secret[-_]?|app(?:lication)?[-_]?)key(?:[-_]?id)?|token|consumer[-_]?(?:id|key|secret)|sign(?:ed|ature)?|auth(?:entication|orization)?)(?:(?:\\s|%20)*(?:=|%3D)[^&]+|(?:\"|%22)(?:\\s|%20)*(?::|%3A)(?:\\s|%20)*(?:\"|%22)(?:%2[^2]|%[^2]|[^\"%])+(?:\"|%22))|(?:bearer(?:\\s|%20)+[a-z0-9._\\-]+|token(?::|%3A)[a-z0-9]{13}|gh[opsu]_[0-9a-zA-Z]{36}|ey[I-L](?:[\\w=-]|%3D)+\\.ey[I-L](?:[\\w=-]|%3D)+(?:\\.(?:[\\w.+/=-]|%3D|%2F|%2B)+)?|-{5}BEGIN(?:[a-z\\s]|%20)+PRIVATE(?:\\s|%20)KEY-{5}[^\\-]+-{5}END(?:[a-z\\s]|%20)+PRIVATE(?:\\s|%20)KEY(?:-{5})?(?:\\n|%0A)?|(?:ssh-(?:rsa|dss)|ecdsa-[a-z0-9]+-[a-z0-9]+)(?:\\s|%20|%09)+(?:[a-z0-9/.+]|%2F|%5C|%2B){100,}(?:=|%3D)*(?:(?:\\s|%20|%09)+[a-z0-9._-]+)?)
Applies a regex to redact sensitive data from query strings on incoming HTTP requests. The default regex matches various sensitive data patterns, including passwords, tokens, API keys, private keys, and authorization terms. Matches are replaced with . If an empty string is passed, no obfuscation occurs. The resulting value is reported in the http.url tag. DD_TRACE_OBFUSCATION_QUERY_STRING_REGEXP_TIMEOUT
- Type:
decimal
Default: 200
Sets the timeout in milliseconds for the query string obfuscation regex execution. Default value is 200ms. DD_TRACE_PARTIAL_FLUSH_ENABLED
- Type:
boolean
Default: false
Enables incrementally flushing large traces to the Datadog Agent, reducing the chance of rejection by the Agent. Use only when you have long-lived traces or traces with many spans. DD_TRACE_PARTIAL_FLUSH_MIN_SPANS
- Type:
int
Default: 500
Number of spans before partially exporting a trace. This prevents keeping all the spans in memory for very large traces. DD_TRACE_PEER_SERVICE_DEFAULTS_ENABLED
- Type:
boolean
Default: false
When enabled, the tracer computes default peer.service values for eligible spans using the v1 peer-service default algorithm under Naming Schema v0. When disabled, Naming Schema v0 leaves peer.service unset. DD_TRACE_PEER_SERVICE_MAPPING
- Type:
map
Maps detected peer service names to normalized values before they are attached to spans. DD_TRACE_PIPE_NAME
- Type:
string
Datadog Agent named pipe: sets the Windows named pipe name/path used as the HTTP transport to communicate with the Datadog Agent (instead of TCP or a Unix domain socket). When set, the tracer’s HTTP client uses a NamedPipe socket factory. Default: unset. DD_TRACE_PIPE_TIMEOUT_MS
- Type:
int
Default: 500
Sets the timeout in milliseconds for named pipes communication. Default value is 0. DD_TRACE_REMOVE_INTEGRATION_SERVICE_NAMES_ENABLED
- Type:
boolean
Default: false
When enabled, integrations under Naming Schema v0 stop using inferred service names and fall back to the application service name. Use this to make all spans report under DD_SERVICE regardless of integration. DD_TRACE_SERVICE_MAPPING
- Type:
string
Renames services using a configuration mapping. Accepts a comma-separated list of key-value pairs in the format [from-key]:[to-name].
Example: mysql:main-mysql-db, mongodb:offsite-mongodb-service
The from-key value is specific to the integration type and should exclude the application name prefix. For example, to rename my-application-sql-server to main-db, use sql-server:main-db.
DD_TRACE_SPAN_ATTRIBUTE_SCHEMA
- Type:
string
Default: v0
Selects the span attribute and naming schema version used by integrations. Accepted values: v0, v1. DD_TRACE_STATS_ADDITIONAL_TAGS
- Type:
array
Since: v3.49.0
Comma separated list of tag keys that will be extracted from span tags and used as extra aggregation dimensions for APM statistics as span-derived primary tags when using client-side stats. Only tags that are added to spans directly using custom instrumentation or set via DD_TAGS are supported. Only applies when client-side stats is enabled DD_TRACE_STATS_ADDITIONAL_TAGS_CARDINALITY_LIMIT
- Type:
int
Default: 100
Since: v3.49.0
Defines the maximum cardinality for APM metrics of the ‘additional_tags’ field calculated from spans during a single flush period, when client-side stats is enabled. When any span is closed that would cause the cardinality of the field to be exceeded, the field is instead replaced with ’tracer_blocked_value’. All subsequent new values for the field will receive the same blocked value. This per-key cardinality limit applies in addition to the whole-key cardinality limit. DD_TRACE_STATS_CARDINALITY_LIMIT
- Type:
int
Default: 2048
Since: v3.49.0
Defines the maximum cardinality for APM metrics calculated from spans during a single flush period, when client-side stats is enabled. When any span is closed that would cause the cardinality threshold to be exceeded, it is instead collapsed into an overflow bucket. This whole-key cardinality limit applies in addition to any per-field cardinality limits. DD_TRACE_STATS_COMPUTATION_ENABLED
- Type:
boolean
Default: false
Enables trace-stats computation in the tracer for stats payload generation and ingestion-side metrics. DD_TRACE_STATS_HTTP_ENDPOINT_CARDINALITY_LIMIT
- Type:
int
Default: 512
Since: v3.49.0
Defines the maximum cardinality for APM metrics of the ‘HTTP_endpoint’ field calculated from spans during a single flush period, when client-side stats is enabled. When any span is closed that would cause the cardinality of the field to be exceeded, the field is instead replaced with ’tracer_blocked_value’. All subsequent new values for the field will receive the same blocked value. This per-key cardinality limit applies in addition to the whole-key cardinality limit. DD_TRACE_STATS_PEER_TAGS_CARDINALITY_LIMIT
- Type:
int
Default: 512
Since: v3.49.0
Defines the maximum cardinality for APM metrics of the ‘peer_tags’ field calculated from spans during a single flush period, when client-side stats is enabled. When any span is closed that would cause the cardinality of the field to be exceeded, the field is instead replaced with ’tracer_blocked_value’. All subsequent new values for the field will receive the same blocked value. This per-key cardinality limit applies in addition to the whole-key cardinality limit. DD_TRACE_STATS_RESOURCE_CARDINALITY_LIMIT
- Type:
int
Default: 1024
Since: v3.49.0
Defines the maximum cardinality for APM metrics of the ‘resource’ field calculated from spans during a single flush period, when client-side stats is enabled. When any span is closed that would cause the cardinality of the field to be exceeded, the field is instead replaced with ’tracer_blocked_value’. All subsequent new values for the field will receive the same blocked value. This per-key cardinality limit applies in addition to the whole-key cardinality limit. DD_TRACE_X_DATADOG_TAGS_MAX_LENGTH
- Type:
int
Default: 512
Maximum length of the x-datadog-tags header for trace tag propagation. Set to 0 to disable.
Sampling rules and rates that determine which traces and spans are kept or dropped, including per-service rules, rate limiting, and priority sampling.
DD_APM_ENABLE_RARE_SAMPLER
- Type:
boolean
Default: false
Enables rare trace sampling in the Datadog Agent. When enabled, the Agent can keep a small number of “rare” traces (up to 5 traces per second per Agent) that were not kept by head-based sampling. DD_MAX_TRACES_PER_SECOND
- Type:
int
Default: 100
Maximum number of traces allowed to be submitted per second. DD_SPAN_SAMPLING_RULES
- Type:
string
Span sampling: JSON rules used to decide per-span sampling priority (single-span sampling). If both DD_SPAN_SAMPLING_RULES and DD_SPAN_SAMPLING_RULES_FILE are set, the file setting is ignored. Rules can match spans by service/name and apply a sample rate and optional max-per-second limit. DD_TRACE_RATE_LIMIT
- Type:
int
Default: 100
Aliases:DD_MAX_TRACES_PER_SECOND
Sets the maximum number of traces to sample per second; applies only when either DD_TRACE_SAMPLING_RULES or DD_TRACE_SAMPLE_RATE is set. DD_TRACE_SAMPLE_RATE
- Type:
decimal
Aliases:OTEL_TRACES_SAMPLER
Controls the ingestion sample rate (between 0.0 and 1.0) between the Agent and the backend. Use OTEL_TRACES_SAMPLER as an alias DD_TRACE_SAMPLING_RULES
- Type:
string
Semi-colon separated list of sampling rules. The rule is matched in order of specification. The first match in a list is used. Per entry: The item “sample_rate” is required in decimal format. The item “service” is optional in regular expression format, to match on service name. The item “name” is optional in regular expression format, to match on operation name. To give a rate of 50% to any traces in a service starting with the text “cart”: ‘[{“sample_rate”:0.5, “service”:“cart.”}]’ To give a rate of 20% to any traces which have an operation name of “http.request”: ‘[{“sample_rate”:0.2, “name”:“http.request”}]’ To give a rate of 100% to any traces within a service named “background” and with an operation name of “sql.query”: ‘[{“sample_rate”:1.0, “service”:“background”, “name”:“sql.query”}] To give a rate of 10% to all traces ‘[{“sample_rate”:0.1}]’ To configure multiple rules, separate by semi-colon and order from most specific to least specific: ‘[{“sample_rate”:0.5, “service”:“cart.”}, {“sample_rate”:0.2, “name”:“http.request”}, {“sample_rate”:1.0, “service”:“background”, “name”:“sql.query”}, {“sample_rate”:0.1}]’ If no rules are specified, or none match, default internal sampling logic will be used. DD_TRACE_SAMPLING_RULES_FORMAT
- Type:
string
Default: glob
Sets the format of custom sampling rules. Valid values are regex or glob. If the value is not recognized, trace sampling rules are disabled.
Distributed trace context propagation, extraction and injection behavior, baggage handling, header tagging, HTTP client and server configuration, and SQL comment injection for Database Monitoring.
DD_EXPERIMENTAL_PROPAGATE_PROCESS_TAGS_ENABLED
- Type:
boolean
Default: true
Since: v3.41.0
Controls whether process-level tags (such as entrypoint metadata) are collected and attached to tracing payloads. DD_HTTP_SERVER_TAG_QUERY_STRING
- Type:
boolean
Default: true
Enables or disables reporting the query string on server spans. Default value is true. DD_HTTP_SERVER_TAG_QUERY_STRING_SIZE
- Type:
int
Default: 5000
Maximum size of the query string to report, before obfuscation. Default value is 5000. A value of 0 means no size limit. DD_TRACE_BAGGAGE_MAX_BYTES
- Type:
int
Default: 8192
Configuration key to set the maximum number of bytes that can be injected into the baggage header when propagating to a downstream service. Default value is 8192 bytes. DD_TRACE_BAGGAGE_MAX_ITEMS
- Type:
int
Default: 64
Configuration key to set the maximum number of items that can be injected into the baggage header when propagating to a downstream service. Default value is 64 items. DD_TRACE_BAGGAGE_TAG_KEYS
- Type:
array
Default: user.id, session.id, account.id
Comma-separated list of baggage keys to copy into span tags. Set to * to tag all baggage items; if unset, a default allowlist is used. - Type:
array
Comma-separated list of HTTP headers to apply automatically as span tags. Each entry can be either a bare header name (which is reported under http.request.headers.<header> for incoming requests and http.response.headers.<header> for outgoing responses) or <header>:<custom_tag_name> to control the tag key. DD_TRACE_HTTP_CLIENT_ERROR_STATUSES
- Type:
string
Default: 400-499
Aliases:DD_HTTP_CLIENT_ERROR_STATUSES
Comma-separated list of HTTP status codes and ranges to treat as errors for HTTP client spans (for example, 400-499,500). When set, matching responses mark the span as an error. DD_TRACE_HTTP_CLIENT_EXCLUDED_URL_SUBSTRINGS
- Type:
string
Specifies which URLs are skipped by the tracer. DD_TRACE_HTTP_SERVER_ERROR_STATUSES
- Type:
string
Default: 500-599
Aliases:DD_HTTP_SERVER_ERROR_STATUSES
Comma-separated list of HTTP status codes or ranges treated as errors for HTTP server spans (for example, 500-599,404). Overrides the default behavior of flagging only 5xx responses as errors. DD_TRACE_INFERRED_PROXY_SERVICES_ENABLED
- Type:
boolean
Default: false
Aliases:DD_TRACE_INFERRED_SPANS_ENABLED
When enabled, the tracer registers the inferred-proxy propagator, which reads x-dd-proxy* headers (currently x-dd-proxy=aws-apigateway) and starts an inferred proxy span as the parent of the server span, using header values for service, resource, and tags. - Type:
string
Default: continue
Specifies how incoming distributed tracing headers should be handled at a service level. Accepted values are: continue: The SDK will continue the distributed trace if the incoming distributed tracing headers represent a valid trace context. restart: The SDK will always start a new trace. If the incoming distributed tracing headers represent a valid trace context, that trace context will be represented as a span link on service entry spans (as opposed to the parent span in the continue configuration). ignore: The SDK will always start a new trace and all incoming distributed tracing headers are ignored. - Type:
boolean
Default: false
When set to true, stops extracting after the first successful trace context extraction. - Type:
array
Default: datadog,tracecontext,baggage
Aliases:DD_PROPAGATION_STYLE_EXTRACT, DD_TRACE_PROPAGATION_STYLE
A comma-separated list of header formats from which to attempt to extract distributed tracing propagation data. The first format found with complete and valid headers is used to define the trace to continue. DD_TRACE_PROPAGATION_STYLE_INJECT
- Type:
array
Default: datadog,tracecontext,baggage
Aliases:DD_PROPAGATION_STYLE_INJECT, DD_TRACE_PROPAGATION_STYLE
A comma-separated list of header formats to include to propagate distributed traces between services. The first format found with complete and valid headers is used to define the trace to continue.
Per-integration tracing configuration: enable/disable, analytics, service name, peer service overrides for library integrations and controls for disabling specific instrumentations.
General Integration Settings
DD_DIAGNOSTIC_SOURCE_ENABLED
- Type:
boolean
Default: true
Enables the use of System.Diagnostics.DiagnosticSource, making it possible to receive spans from libraries that self-instrument with the legacy System.Diagnostics.DiagnosticSource sub-system. Default value is true (enabled). DD_DISABLED_INTEGRATIONS
- Type:
string
List of integrations to disable. All other integrations remain enabled. Default is empty (all integrations are enabled). Supports multiple values separated with semi-colons. It’s an alternative to having multiple “DD_{INTEGRATION_NAME}_ENABLED=false“ DD_TRACE_DISABLED_ACTIVITY_SOURCES
- Type:
string
Specifies a list of ActivitySource names (supports globbing) that will be disabled. Default is empty (all ActivitySources will be subscribed to by default). Disabling ActivitySources may break distributed tracing if those Activities are used to propagate trace context. Supports multiple values separated with commas. For example: “SomeGlob.*.PatternSource,Some.Specific.Source” When the tracer doesn’t subscribe to an ActivitySource, we will NOT propagate the trace context from those Activities (we don’t see them anymore). This means that distributed tracing flows that rely on these Activities for context propagation will break and cause disconnected traces. Potential impact on distributed tracing: Service A -> Ignored Activity -> Service B Creates a single trace with Service A as root and Service B as child Service A -> Disabled Activity -> Service B Creates TWO separate traces with Service A and Service B each as root spans DD_TRACE_DISABLED_ADONET_COMMAND_TYPES
- Type:
string
Default: InterceptableDbCommand,ProfiledDbCommand
Comma-separated list of ADO.NET CommandType names that should not have spans created for them. “InterceptableDbCommand” and “ProfiledDbCommand” are always disabled by default.
Configuration Kinds
Each integration can support one or more of these configuration patterns. Replace <INTEGRATION> with the integration name (for example, GRPC, AWS, REDIS).
Enable or disable tracing for a specific integration.
Available integrations:ANNOTATIONS, AZURE_EVENTHUBS_BATCH_LINKS, AZURE_SERVICEBUS_BATCH_LINKS, BYPASS_HTTP_REQUEST_URL_CACHING, COMMANDS_COLLECTION, DELAY_WCF_INSTRUMENTATION, EXPAND_ROUTE_TEMPLATES, HEADER_TAG_NORMALIZATION_FIX, INJECT_CONTEXT_INTO_STORED_PROCEDURES, KAFKA_CREATE_CONSUMER_SCOPE, LOG_BUFFERING, METRICS, OTEL_SEMANTICS, ROUTE_TEMPLATE_RESOURCE_NAMES, SINGLE_SPAN_ASPNETCORE, WCF_RESOURCE_OBFUSCATION, WCF_WEB_HTTP_RESOURCE_NAMES
Per-Integration Settings (20 integrations)
Each section lists all configuration keys available for a specific integration.
DD_TRACE_ANNOTATIONS_ENABLED
- Type:
boolean
Default: true
Since: v3.47.0
Controls whether the native tracer applies [Trace] attribute instrumentation. Default is true.
DD_TRACE_AWS_ADD_SPAN_POINTERS
- Type:
boolean
Default: true
Enables or disables span pointers on AWS requests. Default value is true
DD_TRACE_AZURE_EVENTHUBS_BATCH_LINKS_ENABLED
- Type:
boolean
Default: true
Enables instrumentation for azure eventhubs batch links. When disabled, spans for azure eventhubs batch links operations are not created.
DD_TRACE_AZURE_SERVICEBUS_BATCH_LINKS_ENABLED
- Type:
boolean
Default: true
Enables instrumentation for azure servicebus batch links. When disabled, spans for azure servicebus batch links operations are not created.
DD_TRACE_BYPASS_HTTP_REQUEST_URL_CACHING_ENABLED
- Type:
boolean
Default: false
When enabled, the request URL is built without using the cached HttpRequest.Url value to avoid triggering URL caching behavior. This can prevent issues in environments where caching the URL early can affect application behavior.
DD_TRACE_COMMANDS_COLLECTION_ENABLED
- Type:
boolean
Default: false
Controls whether command-line details are collected for process execution instrumentation. When enabled, the executable and arguments may be captured (truncated as needed); when disabled, command-line details are omitted.
DD_TRACE_DELAY_WCF_INSTRUMENTATION_ENABLED
- Type:
boolean
Default: true
Enables the updated WCF instrumentation that delays execution until later in the WCF pipeline when the WCF server exception handling is established.
DD_TRACE_EXPAND_ROUTE_TEMPLATES_ENABLED
- Type:
boolean
Default: false
Expands route parameters in ASP.NET and ASP.NET Core resource names with their actual values, except for ID parameters. Useful when parameter names differentiate between form values or slugs (for example, in GraphQL). Only applies when route-template resource names are enabled.
DD_TRACE_GRAPHQL_ERROR_EXTENSIONS
- Type:
array
Comma-separated list of GraphQL error extension keys to capture as span tags. When unset, no extensions are captured.
DD_TRACE_GRPC_TAGS
- Type:
string
Maps GRPC metadata keys to tag names. Automatically applies GRPC metadata values as tags on traces.
DD_TRACE_INJECT_CONTEXT_INTO_STORED_PROCEDURES_ENABLED
- Type:
boolean
Default: false
Enables the injection of the Datadog trace context into stored procedures. Default value is false (disabled). When enabled, Datadog trace context will be injected into individual stored procedure calls when the following requirements are met: - The database is Microsoft SQL Server and TracerSettings.DbmPropagationMode is set to service or full. - The stored procedure call does not have Output, InputOutput, or Return ADO.NET command parameters.
DD_TRACE_KAFKA_CREATE_CONSUMER_SCOPE_ENABLED
- Type:
boolean
Default: true
Alters the behavior of the Kafka consumer span.
When true (default), the consumer span is created when a message is consumed and closed before consuming the next message. The span duration represents the computation between two consecutive message consumptions. Use this setting when message consumption is performed in a loop.
When false, the consumer span is created when a message is consumed and closed immediately. Use this setting when a message is not processed completely before consuming the next one, or when multiple messages are consumed at once. With this setting, you must extract the context manually for child spans.
DD_TRACE_LOG_BUFFERING_ENABLED
- Type:
boolean
Default: false
Since: v3.47.0
Controls log output buffering in the native loader. Only relevant under Windows single-step instrumentation (SSI). Inside SSI the effective default is true (buffered); outside SSI buffering is always disabled regardless of this setting.
DD_TRACE_METRICS_ENABLED
- Type:
boolean
Default: false
Enables or disables internal metrics sent to DogStatsD. Default value is false (disabled).
DD_TRACE_OTEL_SEMANTICS_ENABLED
- Type:
boolean
Default: false
Since: v3.49.0
When enabled, spans exported over OTLP follow OpenTelemetry semantic conventions instead of Datadog conventions, so the exported output matches what the OpenTelemetry SDK would produce. The SDK omits Datadog specific span attributes (e.g. operation.name) and conveys span kind and error information through the native OTLP fields.
Use this when you instrument with OpenTelemetry APIs and export traces via OTLP and want OpenTelemetry-native output (for example, to match traces produced by the OpenTelemetry SDK or to keep a vendor-neutral pipeline).
DD_TRACE_ROUTE_TEMPLATE_RESOURCE_NAMES_ENABLED
- Type:
boolean
Default: true
Dotnet web server instrumentation. Feature Flag: enables updated resource names on aspnet.request, aspnet-mvc.request, aspnet-webapi.request, and aspnet_core.request spans. Enables aspnet_core_mvc.request spans and additional features on aspnet_core.request spans.
DD_TRACE_SINGLE_SPAN_ASPNETCORE_ENABLED
- Type:
boolean
Default: false
Dotnet web server instrumentation. Enables generating only a single span in the ASP.NET Core integration, by only creating aspnet_core.request spans, without creating handler spans or tracking specific route values. Not compatible with DD_TRACE_ROUTE_TEMPLATE_RESOURCE_NAMES_ENABLED (that value is ignored), but may be used with DD_TRACE_EXPAND_ROUTE_TEMPLATES_ENABLED. Only supported on .NET 6+
DD_TRACE_WCF_RESOURCE_OBFUSCATION_ENABLED
- Type:
boolean
Default: true
Feature flag to enable obfuscating the LocalPath of a WCF request that goes into the resourceName of a span. Note: that this only applies when the WCF action is an empty string.
DD_TRACE_WCF_WEB_HTTP_RESOURCE_NAMES_ENABLED
- Type:
boolean
Default: true
Configuration key to enable or disable improved template-based resource names when using WCF Web HTTP. Requires delayed WCF instrumentation to be enabled. Enabled by default.
These keys are no longer supported in current versions of the library. They are listed here for reference if you are running an older version.
DD_TRACE_DATA_PIPELINE_ENABLED
- Removed in v3.46.0.
Type: boolean
Default: false
Use libdatadog data pipeline to send traces. Default value is false (disabled).
Database Monitoring (DBM): SQL comment propagation modes and query identifier hashing for correlating database performance with application traces.
DD_DBM_INJECT_SQL_BASEHASH
- Type:
boolean
Default: false
Since: v3.41.0
Enables the injection of a “base hash” in SQL queries when DBM propagation is also enabled. This base hash is used to find matching spans, and enrich the queries with related values. DD_DBM_PROPAGATION_MODE
- Type:
string
Default: disabled
Enables linking between data sent from APM and the Database Monitoring product when set to service or full. The service option enables the connection between DBM and APM services. The full option enables connection between database spans with database query events. Available for Postgres and MySQL.
Tracer log output settings: log levels, log file paths, log rotation, and startup diagnostics.
DD_LOG_LEVEL
- Type:
string
Sets the Datadog logging level. Valid values are trace, debug, info, warn, error, critical, or off. DD_MAX_LOGFILE_SIZE
- Type:
int
Default: 10485760
Approximate maximum size, in bytes, for Tracer log files. Default value is 10 MB. DD_TRACE_DEBUG
- Type:
boolean
Default: false
Aliases:OTEL_LOG_LEVEL
Enables debug mode for the SDK. When set, the SDK emits verbose log messages for troubleshooting. Takes precedence over DD_TRACE_LOG_LEVEL when active. Use OTEL_LOG_LEVEL as an alias.
Language-specific notes:
- PHP: log messages are written to the device or file set in the PHP
error_log INI setting. The actual value may differ from php -i output because it can be overridden in PHP-FPM/Apache configuration files.
DD_TRACE_LOG_DIRECTORY
- Type:
string
Default: /var/log/datadog/dotnet
Sets the directory for .NET Tracer logs. Overrides the value in Datadog.Trace.Configuration.ConfigurationKeys.TraceLogPath if present. Default value is “%ProgramData%"\Datadog .NET Tracer\logs" on Windows or “/var/log/datadog/dotnet/” on Linux. DD_TRACE_LOG_PATH
- Type:
string
Deprecated, use DD_TRACE_LOG_DIRECTORY instead, and make sure it is a directory and not a file path DD_TRACE_LOG_SINKS
- Type:
string
Default: file
Specifies locations to write internal diagnostic logs. Currently only file is supported. Defaults to file. DD_TRACE_LOGFILE_RETENTION_DAYS
- Type:
int
Default: 32
Sets the number of days after which log files are deleted based on their last write-time date. DD_TRACE_LOGGING_RATE
- Type:
int
Default: 0
Sets the number of seconds between identical log messages for Tracer log files. Default value is 0 and setting to 0 disables rate limiting. DD_TRACE_STARTUP_LOGS
- Type:
boolean
Default: true
Enables emission of startup configuration and diagnostic log lines when the tracer initializes.
Continuous Profiler configuration: enable/disable, upload settings, profiling types, engine options, code hotspots, endpoint profiling, and experimental features.
DD_PROFILING_AGENTLESS
- Type:
boolean
Default: false
Since: v3.47.0
Enables agentless profile upload, sending profiles directly to the Datadog backend instead of through a Datadog Agent. DD_PROFILING_ALLOCATION_ENABLED
- Type:
boolean
Default: false
Since: v3.47.0
Aliases:DD_PROFILING_DDPROF_ALLOC_ENABLED
If set to true, enables Allocation profiling (in Preview). Defaults to false. DD_PROFILING_CODEHOTSPOTS_ENABLED
- Type:
boolean
Default: true
Aliases:DD_PROFILING_EXPERIMENTAL_CODEHOTSPOTS_ENABLED
Enables or disables code hotspots collection for the continuous profiler. When disabled, profiling data is not linked to tracing context for hotspot attribution. DD_PROFILING_CPU_ENABLED
- Type:
boolean
Default: true
Since: v3.47.0
Aliases:DD_PROFILING_EXPERIMENTAL_CPU_ENABLED
If set to false, disables the CPU profiling. Defaults to true. DD_PROFILING_ENABLED
- Type:
string
Default: false
Aliases:DD_EXPERIMENTAL_PROFILING_ENABLED
If set to true, enables the profiler. Defaults to false. DD_PROFILING_ENDPOINT_COLLECTION_ENABLED
- Type:
boolean
Default: true
Aliases:DD_PROFILING_EXPERIMENTAL_ENDPOINT_COLLECTION_ENABLED
Controls whether spans add a pprof label with the top-level request endpoint so profiles can be grouped by endpoint in the Datadog UI. DD_PROFILING_EXCEPTION_ENABLED
- Type:
boolean
Default: true
Since: v3.47.0
Enables exception-event profiling so exception-heavy code paths appear in profiles. Useful when diagnosing error storms or control-flow via exceptions. DD_PROFILING_GC_ENABLED
- Type:
boolean
Default: true
Since: v3.47.0
Enables garbage collection profiling, collecting GC activity in profiles. DD_PROFILING_HEAP_ENABLED
- Type:
boolean
Default: false
Since: v3.47.0
If set to true, enables Live Heap profiling (in Preview). Defaults to false. DD_PROFILING_LOCK_ENABLED
- Type:
boolean
Default: true
Since: v3.47.0
If this config is set to false, the lock profile collection will be disabled DD_PROFILING_UPLOAD_PERIOD
- Type:
int
Default: 60
Since: v3.47.0
Profiling: upload period in seconds (recording duration); controls how frequently profiles are uploaded
Application Security configuration: ASM threat detection and blocking, user event tracking, IAST vulnerability detection, API Security schema discovery, and error tracking.
DD_API_SECURITY_DOWNSTREAM_BODY_ANALYSIS_SAMPLE_RATE
- Type:
decimal
Default: 0.5
Since: v3.42.0
Defines the probability of a downstream request body being sampled, or said differently, defines the overall number of requests for which the request and response body should be sampled / analysed. DD_API_SECURITY_ENABLED
- Type:
boolean
Default: true
Aliases:DD_EXPERIMENTAL_API_SECURITY_ENABLED
Controls whether API Security features are enabled. If unset, API Security is enabled by default. DD_API_SECURITY_ENDPOINT_COLLECTION_ENABLED
- Type:
boolean
Default: true
Controls whether API endpoint definitions are collected and reported for use in API Catalog. Disable to suppress endpoint discovery. DD_API_SECURITY_ENDPOINT_COLLECTION_MESSAGE_LIMIT
- Type:
int
Default: 300
Sets the maximum number of API endpoints included in a single endpoint-collection telemetry message. If unset, a default limit is used. DD_API_SECURITY_MAX_DOWNSTREAM_REQUEST_BODY_ANALYSIS
- Type:
int
Default: 1
Since: v3.42.0
The maximum number of downstream requests per request for which the request and response body should be analysed. DD_API_SECURITY_PARSE_RESPONSE_BODY
- Type:
boolean
Default: true
Enables the parsing of the response body in the API Security module. Defaults to true DD_APPSEC_AUTO_USER_INSTRUMENTATION_MODE
- Type:
string
Default: identification
Selects the AppSec automatic user instrumentation mode, which controls how user events are collected. DD_APPSEC_AUTOMATED_USER_EVENTS_TRACKING
- Type:
string
Default: identification
Deprecate. Automatic tracking of user events mode. Values can be disabled, safe or extended. This config is in the process of being deprecated. Please use DD_APPSEC_AUTO_USER_INSTRUMENTATION_MODE instead. Values will be automatically translated: disabled = disabled safe = anon extended = ident DD_APPSEC_BODY_PARSING_SIZE_LIMIT
- Type:
int
Default: 10000000
Since: v3.42.0
Maximum size of the bodies to be processed in bytes. If set to 0, the bodies are not processed. (Recommended value: 10000000 (10MB)) DD_APPSEC_ENABLED
- Type:
boolean
Default: false
Enables or disables the AppSec product inside the tracer. When enabled, the tracer initializes the AppSec module (in-app WAF, header/body collection, and AppSec telemetry). - Type:
string
Comma separated of additional header names (beyond the default allowlist) that the tracer should capture. This is useful when a service requires custom authentication or application-specific headers to be analysed. Extra headers should be configured with privacy considerations in mind and are typically kept only within the customer’s org; the tracer will obey redaction/obfuscation settings for header values DD_APPSEC_HTTP_BLOCKED_TEMPLATE_HTML
- Type:
string
Path to a local HTML template file that will be returned when a request is blocked and the response should be HTML. If unset or invalid, the tracer uses the default blocking HTML template defined by the product RFC. The tracer decides HTML or JSON according to Accept header or the block action’s parameters. DD_APPSEC_HTTP_BLOCKED_TEMPLATE_JSON
- Type:
string
Path to a local JSON template file that will be returned when a request is blocked and the response should be JSON. If unset or invalid, the tracer uses the default blocking HTML template defined by the product RFC. The tracer decides HTML or JSON according to Accept header or the block action’s parameters. - Type:
string
Specify a single HTTP header to use for client IP resolution. When set, the tracer treats that header as the authoritative source of client IP and ignores the default set of candidate headers. This helps avoid ambiguity and IP spoofing issues when proxies or CDNs provide custom client IP headers; use with caution and follow deployment best practices. DD_APPSEC_MAX_STACK_TRACE_DEPTH
- Type:
int
Default: 32
Aliases:DD_APPSEC_MAX_STACKTRACE_DEPTH
Maximum number of stack frames retained for any stack trace attached to an AppSec event. When the limit is reached, deeper frames are truncated and the top-of-stack frames are preserved. Lower the value to reduce event payload size. DD_APPSEC_MAX_STACK_TRACE_DEPTH_TOP_PERCENT
- Type:
int
Default: 75
When the tracer must trim a stacktrace, this value controls how much of the top portion of the stacktrace is preserved at higher fidelity (a percentage). This lets implementations keep more of the top frames (most actionable) while trimming the less usefully deep frames DD_APPSEC_MAX_STACK_TRACES
- Type:
int
Default: 2
Aliases:DD_APPSEC_MAX_STACKTRACES
Limits how many separate stacktraces are captured and attached to an AppSec/IAST event to keep payload sizes reasonable. Evidence stacktraces are useful for triage, but unbounded capture can leak sensitive data and consume excessive bandwidth; this limit balances evidence value and safety. Set to 0 to collect all. DD_APPSEC_OBFUSCATION_PARAMETER_KEY_REGEXP
- Type:
string
Default: (?i)(?:p(?:ass)?w(?:or)?d|pass(?:_?phrase)?|secret|(?:api_?|private_?|public_?)key)|token|consumer_?(?:id|key|secret)|sign(?:ed|ature)|bearer|authorization
A regular expression used by the AppSec obfuscator to identify parameter keys that must cause full redaction. When any key_path string matches this regexp the entire parameter is replaced by <redacted by datadog>. The default key regexp matches common secret/key names (password, token, authorization, jwt, etc.) an empty string disables the key regexp DD_APPSEC_RASP_ENABLED
- Type:
boolean
Default: true
Turns on the tracer’s RASP / Exploit Prevention capabilities. When enabled the tracer runs synchronous, pre-execution checks and may generate block actions or exploit signals. RASP may have separate activation and implementation details per language; enabling it usually activates extra synchronous instrumentation and additional evidence capture for detections DD_APPSEC_RULES
- Type:
string
Override the default rules file provided. Must be a path to a valid JSON rules file DD_APPSEC_SCA_ENABLED
- Type:
boolean
Enables the tracer’s runtime Software Composition Analysis (Runtime SCA) capability, which reports runtime dependency/SBOM information and powers runtime vulnerability detection. Useful for testing and demonstrations as well as production runtime vulnerability workflows; SCA may have billing/usage implications and language compatibility constraints described in the SCA runbooks DD_APPSEC_STACK_TRACE_ENABLED
- Type:
boolean
Default: true
Aliases:DD_APPSEC_STACKTRACE_ENABLED
Enables security-related stack traces generation when security events occur. DD_APPSEC_TRACE_RATE_LIMIT
- Type:
int
Default: 100
Controls the maximum amount of AppSec traces, per second. DD_APPSEC_WAF_TIMEOUT
- Type:
int
Default: 100000
Limits the WAF synchronous execution time (in microseconds). DD_EXPERIMENTAL_APPSEC_USE_UNSAFE_ENCODER
- Type:
boolean
Default: false
Use new unsafe encoder for the waf DD_IAST_COOKIE_FILTER_PATTERN
- Type:
string
Default: .*
Number of rows to taint on each database query in IAST. Default value is 1. DD_IAST_DB_ROWS_TO_TAINT
- Type:
int
Default: 1
IAST: maximum number of JDBC ResultSet rows to treat as taint sources (SQL table data) for a given ResultSet. Rows beyond this limit are not tainted. Default: 1. DD_IAST_DEDUPLICATION_ENABLED
- Type:
boolean
Default: true
Enables or disables vulnerability deduplication detection. When enabled, a vulnerability is only reported once in the lifetime of an app, instead of on every occurrence. Default value is true (enabled). DD_IAST_ENABLED
- Type:
boolean
Default: false
Enables or disables IAST. Default value is false (disabled). DD_IAST_MAX_CONCURRENT_REQUESTS
- Type:
int
Default: 2
Maximum number of requests to be analyzed by IAST concurrently. Default value is 2. DD_IAST_MAX_RANGE_COUNT
- Type:
int
Default: 10
IAST: maximum number of tainted ranges stored per tainted object/value. If more ranges are produced, they are truncated to this limit. Only used in DEFAULT detection mode; in FULL detection mode this is unlimited. Default (in DEFAULT mode): 10. DD_IAST_REDACTION_ENABLED
- Type:
boolean
Default: true
Enables or disables IAST redaction of sensitive data. Default value is in TracerSettings. DD_IAST_REDACTION_NAME_PATTERN
- Type:
string
Default: (?i)(?:p(?:ass)?w(?:or)?d|pass(?:_?phrase)?|secret|(?:api_?|private_?|public_?|access_?|secret_?)key(?:_?id)?|token|consumer_?(?:id|key|secret)|sign(?:ed|ature)?|auth(?:entication|orization)?|(?:sur|last)name|user(?:name)?|address|e?mail)
Custom regex pattern to obfuscate source keys in IAST. Default value is in TracerSettings. DD_IAST_REDACTION_VALUE_PATTERN
- Type:
string
Default: (?i)(?:bearer\\s+[a-z0-9\\._\\-]+|glpat-[\\w\\-]{20}|gh[opsu]_[0-9a-zA-Z]{36}|ey[I-L][\\w=\\-]+\\.ey[I-L][\\w=\\-]+(?:\\.[\\w.+/=\\-]+)?|(?:[\\-]{5}BEGIN[a-z\\s]+PRIVATE\\sKEY[\\-]{5}[^\\-]+[\\-]{5}END[a-z\\s]+PRIVATE\\sKEY[\\-]{5}|ssh-rsa\\s*[a-z0-9/\\.+]{100,})|[\\w\\.-]+@[a-zA-Z\\d\\.-]+\\.[a-zA-Z]{2,})
Custom regex pattern to obfuscate source values in IAST. Default value is in TracerSettings. DD_IAST_REGEXP_TIMEOUT
- Type:
decimal
Default: 200.0
Timeout in milliseconds for regex execution in IAST. Default value is 200ms. DD_IAST_REQUEST_SAMPLING
- Type:
int
Default: 30
Percentage of requests to be analyzed by IAST, between 1 and 100. Default value is 30. DD_IAST_SECURITY_CONTROLS_CONFIGURATION
- Type:
string
Since: v3.47.0
IAST: configures custom security controls (sanitizers / input validators) via a semicolon-separated configuration string. When set, the tracer installs a transformer that instruments the specified classes/methods so IAST can mark data as validated/sanitized for specific vulnerability types. DD_IAST_TELEMETRY_VERBOSITY
- Type:
string
Default: information
Specifies the verbosity of the sent telemetry. Default ‘INFORMATION’ DD_IAST_TRUNCATION_MAX_VALUE_LENGTH
- Type:
int
Default: 250
Default value is 250 DD_IAST_VULNERABILITIES_PER_REQUEST
- Type:
int
Default: 2
IAST: maximum number of vulnerabilities that can be reported per request (quota/overhead control). In FULL detection mode this limit is removed; in DEFAULT detection mode the default is 2. DD_IAST_WEAK_CIPHER_ALGORITHMS
- Type:
string
Default: DES,TRIPLEDES,RC2
Controls which weak cipher algorithms are reported. DD_IAST_WEAK_HASH_ALGORITHMS
- Type:
string
Default: HMACMD5,MD5,HMACSHA1,SHA1
Controls which weak hashing algorithms are reported.
Remote debugging capabilities: Dynamic Instrumentation for live probes, Exception Replay for automatic variable capture, Symbol Database for source-level debugging, and Code Origin for Spans for linking spans back to source code.
DD_CODE_ORIGIN_FOR_SPANS_ENABLED
- Type:
boolean
Default: true
Since: v3.45.0
Enables code origin for spans behavior in the tracer. When disabled, related data collection and processing are skipped. DD_CODE_ORIGIN_FOR_SPANS_MAX_USER_FRAMES
- Type:
int
Default: 8
Maximum number of frames to tag in exit span code origin. Default value is 8. DD_DYNAMIC_INSTRUMENTATION_DIAGNOSTICS_INTERVAL
- Type:
int
Default: 3600
Interval (seconds) at which probe diagnostic/status messages (received/installed/emitting/errors) may be re-emitted DD_DYNAMIC_INSTRUMENTATION_ENABLED
- Type:
boolean
Default: false
Enables Dynamic Instrumentation, allowing log probes and metric probes to be added to running services from the Datadog UI without redeploying. DD_DYNAMIC_INSTRUMENTATION_MAX_DEPTH_TO_SERIALIZE
- Type:
int
Default: 3
Maximum object depth to serialize for probe snapshots DD_DYNAMIC_INSTRUMENTATION_MAX_TIME_TO_SERIALIZE
- Type:
int
Default: 200
Maximum duration (in milliseconds) to run serialization for probe snapshots. DD_DYNAMIC_INSTRUMENTATION_PROBE_FILE
- Type:
string
Since: v3.43.0
Path to a local probe definition JSON file. When set, the tracer loads probe definitions from this file at startup instead of subscribing to remote configuration. DD_DYNAMIC_INSTRUMENTATION_REDACTED_EXCLUDED_IDENTIFIERS
- Type:
string
Set of identifiers that are excluded from redaction decisions. DD_DYNAMIC_INSTRUMENTATION_REDACTED_IDENTIFIERS
- Type:
array
Comma-separated list of additional identifier keywords to redact in captured snapshot data DD_DYNAMIC_INSTRUMENTATION_REDACTED_TYPES
- Type:
array
Comma-separated list of object types to redact from dynamic logs and snapshots. Supports * wildcards (e.g. Secret* matches SecretKey). DD_DYNAMIC_INSTRUMENTATION_REDACTION_EXCLUDED_IDENTIFIERS
- Type:
string
Comma-separated list of identifier keywords to exclude from the default redaction list. Useful to prevent common keywords like password from being treated as sensitive for your use case. DD_DYNAMIC_INSTRUMENTATION_UPLOAD_BATCH_SIZE
- Type:
int
Default: 100
Upload batch size (number of snapshots/diagnostic messages per request). Controls how many snapshots are serialized and sent per flush. Default: 100. DD_DYNAMIC_INSTRUMENTATION_UPLOAD_FLUSH_INTERVAL
- Type:
int
Default: 0
Low-rate upload flush interval in milliseconds. 0 (default) enables an adaptive flush interval; any other value uses a fixed interval. Deprecated in favor of DD_DYNAMIC_INSTRUMENTATION_UPLOAD_INTERVAL_SECONDS. DD_EXCEPTION_REPLAY_AGENTLESS_ENABLED
- Type:
boolean
Default: false
Enables or disables agentless Exception Replay uploads. Default value is false. DD_EXCEPTION_REPLAY_AGENTLESS_URL
- Type:
string
When Agentless mode in Exception Replay is enabled we can use this configuration to force an URL for the intake DD_EXCEPTION_REPLAY_CAPTURE_FULL_CALLSTACK_ENABLED
- Type:
boolean
Default: false
Configuration key to enable capturing the variables of all the frames in exception call stack. Default value is false. DD_EXCEPTION_REPLAY_CAPTURE_MAX_FRAMES
- Type:
int
Default: 4
Maximum number of frames in a call stack to capture values for. DD_EXCEPTION_REPLAY_ENABLED
- Type:
boolean
Default: false
Aliases:DD_EXCEPTION_DEBUGGING_ENABLED
Enables or disables Exception Replay. Default value is false (disabled). DD_EXCEPTION_REPLAY_MAX_EXCEPTION_ANALYSIS_LIMIT
- Type:
int
Default: 100
Exception Replay: maximum number of exceptions per second to analyze/handle (circuit breaker). When the limit is exceeded, additional exceptions are ignored for that second. Default: 100. DD_EXCEPTION_REPLAY_RATE_LIMIT_SECONDS
- Type:
int
Default: 3600
Interval used to rate-limit exception tracking. Default value is 1h. DD_SYMBOL_DATABASE_BATCH_SIZE_BYTES
- Type:
int
Default: 100000
Maximum symbol size to upload, in bytes. Default value is 1 MB. DD_SYMBOL_DATABASE_COMPRESSION_ENABLED
- Type:
boolean
Default: true
Enables or disables compression for the symbols payload. Default value is true (enabled). DD_SYMBOL_DATABASE_THIRD_PARTY_DETECTION_EXCLUDES
- Type:
string
Comma-separated list of libraries to exclude from third-party detection in the symbol database. Default value is empty. DD_SYMBOL_DATABASE_THIRD_PARTY_DETECTION_INCLUDES
- Type:
string
Comma-separated list of libraries to include in third-party detection in the symbol database. Default value is empty. DD_SYMBOL_DATABASE_UPLOAD_ENABLED
- Type:
boolean
Default: true
Symbol Database (SymDB): enables uploading symbol information (for Live Debugging / Dynamic Instrumentation). Default: true.
CI Visibility and Test Optimization: test reporting, code coverage collection, git metadata, flaky test management, test skipping, and CI provider integration.
DD_ACTION_EXECUTION_ID
- Type:
string
Sets the action execution ID reported as CI metadata for AWS CodePipeline builds. This value is used as the CI job identifier when running a CodeBuild job initiated by CodePipeline. DD_CIVISIBILITY_AGENTLESS_ENABLED
- Type:
boolean
Default: false
Enables agentless mode for CI Visibility, sending test data directly to the Datadog intake instead of through a local Agent. DD_CIVISIBILITY_AGENTLESS_URL
- Type:
string
Overrides the intake base URL used for agentless CI test reporting. When set, payloads are sent to this URL instead of the default site-based intake URL. DD_CIVISIBILITY_AUTO_INSTRUMENTATION_PROVIDER
- Type:
boolean
Default: false
Identifies the auto instrumentation provider for CI Visibility. This is used to track which instrumentation method was used (e.g., single-step, manual, etc.). DD_CIVISIBILITY_CODE_COVERAGE_COLLECTORPATH
- Type:
string
Path to the code coverage collector. DD_CIVISIBILITY_CODE_COVERAGE_ENABLE_JIT_OPTIMIZATIONS
- Type:
boolean
Default: true
Enables or disables JIT optimizations in Code Coverage. DD_CIVISIBILITY_CODE_COVERAGE_ENABLED
- Type:
boolean
Enables or disables Code Coverage in CI Visibility. DD_CIVISIBILITY_CODE_COVERAGE_MODE
- Type:
string
Selects the code coverage mode: LineExecution or LineCallCount. DD_CIVISIBILITY_CODE_COVERAGE_PATH
- Type:
string
Destination path for code coverage JSON files. DD_CIVISIBILITY_CODE_COVERAGE_SNK_FILEPATH
- Type:
string
Path to the SNK file used for re-signing assemblies after Code Coverage modification. DD_CIVISIBILITY_DI_ENABLED
- Type:
boolean
Default: false
Dependency injection for CI Visibility DD_CIVISIBILITY_EARLY_FLAKE_DETECTION_ENABLED
- Type:
boolean
Enables or disables the early flake detection feature in CI Visibility. DD_CIVISIBILITY_ENABLED
- Type:
boolean
Enabling or disabling CI Visibility DD_CIVISIBILITY_EXTERNAL_CODE_COVERAGE_PATH
- Type:
string
Path to the external code coverage file. DD_CIVISIBILITY_FLAKY_RETRY_COUNT
- Type:
int
Default: 5
Can be set to any non-negative number to change the maximum number of retries per test case. DD_CIVISIBILITY_FLAKY_RETRY_ENABLED
- Type:
boolean
A kill switch for the auto test retries feature. DD_CIVISIBILITY_GIT_UPLOAD_ENABLED
- Type:
boolean
Enables or disables uploading Git metadata in CI Visibility. Default Value is false (disabled). DD_CIVISIBILITY_IMPACTED_TESTS_DETECTION_ENABLED
- Type:
boolean
Enables or disables Impacted Tests Detection. DD_CIVISIBILITY_ITR_ENABLED
- Type:
boolean
Default: true
Enables or disables Intelligent Test Runner in CI Visibility. Default Value is false (disabled). DD_CIVISIBILITY_KNOWN_TESTS_ENABLED
- Type:
boolean
Enables or disables the known tests feature in CI Visibility. DD_CIVISIBILITY_LOGS_ENABLED
- Type:
boolean
Default: false
Enables direct submission of CI test logs to the Datadog Logs intake. DD_CIVISIBILITY_RUM_FLUSH_WAIT_MILLIS
- Type:
int
Default: 500
CI Visibility (Selenium): after calling window.DD_RUM.stopSession() at the end of a browser test, waits this many milliseconds before proceeding to allow RUM data to flush (default: 500ms). DD_CIVISIBILITY_TESTSSKIPPING_ENABLED
- Type:
boolean
Enables or disables the Intelligent Test Runner test skipping feature in CI Visibility. DD_CIVISIBILITY_TOTAL_FLAKY_RETRY_COUNT
- Type:
int
Default: 1000
Maximum total number of automatic test retries allowed across the entire CI test session, applied when automatic flaky-test retries are enabled. DD_CUSTOM_TRACE_ID
- Type:
string
Custom trace ID propagated by the Jenkins Datadog Plugin, used to correlate Jenkins pipeline executions with traces emitted by the application under test. DD_GIT_BRANCH
- Type:
string
Overrides the Git branch value used by CI Visibility for repository and commit correlation. DD_GIT_COMMIT_AUTHOR_DATE
- Type:
string
Overrides the commit-author date, in ISO 8601 format, reported as CI metadata. DD_GIT_COMMIT_AUTHOR_EMAIL
- Type:
string
Overrides the git commit author email reported as CI metadata. DD_GIT_COMMIT_AUTHOR_NAME
- Type:
string
Overrides the git commit author name reported as CI metadata. DD_GIT_COMMIT_COMMITTER_DATE
- Type:
string
Overrides the commit-committer date, in ISO 8601 format, reported as CI metadata. DD_GIT_COMMIT_COMMITTER_EMAIL
- Type:
string
Overrides the git commit committer email reported as CI metadata. DD_GIT_COMMIT_COMMITTER_NAME
- Type:
string
Overrides the git commit committer name reported as CI metadata. DD_GIT_COMMIT_MESSAGE
- Type:
string
Overrides the git commit message reported as CI metadata. DD_GIT_COMMIT_SHA
- Type:
string
Overrides the git commit SHA reported as CI metadata and used for git metadata tagging when enabled. DD_GIT_PULL_REQUEST_BASE_BRANCH
- Type:
string
CI Visibility: sets the pull request base/target branch name, used to populate pull request info and CI git tags (for example, git.pull_request.base_branch) when user-supplied git metadata is needed. DD_GIT_PULL_REQUEST_BASE_BRANCH_SHA
- Type:
string
Overrides the pull request base commit SHA reported as git metadata for CI features. Use this to set the base commit when it cannot be detected automatically. DD_GIT_REPOSITORY_URL
- Type:
string
Overrides the git repository URL reported as CI metadata and used for git metadata tagging when enabled. Any embedded credentials in the URL are stripped before use. DD_GIT_TAG
- Type:
string
Overrides the Git tag used by CI Visibility for repository and release correlation. DD_PIPELINE_EXECUTION_ID
- Type:
string
Sets the pipeline execution ID reported as CI metadata for AWS CodePipeline builds. This value is used as the CI pipeline identifier when running a CodeBuild job initiated by CodePipeline. DD_TEST_MANAGEMENT_ATTEMPT_TO_FIX_RETRIES
- Type:
int
Overrides the number of retry executions for tests flagged as “attempt to fix”. When unset, the value from backend/remote settings is used. DD_TEST_MANAGEMENT_ENABLED
- Type:
boolean
Enables or disables the Test Management feature. DD_TEST_SESSION_NAME
- Type:
string
Overrides the auto-generated test session name reported to CI Visibility. When unset, the tracer builds a name from the detected CI provider, repository, and branch information. DD_TESTSESSION_COMMAND
- Type:
string
Specifies the test session command that was executed. This is used to track the command line that initiated the test session. DD_TESTSESSION_WORKINGDIRECTORY
- Type:
string
Specifies the test session working directory. This is used to track the working directory where the test session was executed. DD_TRACE_GIT_METADATA_ENABLED
- Type:
boolean
Default: true
When enabled, the tracer attaches Git repository URL and commit SHA tags to root spans, allowing traces to be linked back to the corresponding source code in the Datadog UI.
Crash tracking for capturing and reporting application crashes, and heap snapshot configuration.
DD_CRASHTRACKING_ENABLED
- Type:
boolean
Default: true
Since: v3.47.0
Enables Crash Tracking. When enabled, the tracer initializes crash tracking and configures JVM crash/OOM hooks (for example, -XX:OnError and -XX:OnOutOfMemoryError) to run Datadog-provided scripts that upload hs_err_pid*.log crash logs and OOME notifications. Default: true.
Direct log submission to Datadog, agentless log forwarding, log injection for trace-log correlation, and OpenTelemetry log export.
DD_LOGS_DIRECT_SUBMISSION_AZURE_FUNCTIONS_HOST_ENABLED
- Type:
boolean
Default: false
Enables direct log submission to the Datadog backend for Azure Functions hosts DD_LOGS_DIRECT_SUBMISSION_BATCH_PERIOD_SECONDS
- Type:
int
Default: 2
Time to wait between checking for log batches. Default value is 2s. DD_LOGS_DIRECT_SUBMISSION_HOST
- Type:
string
Set the name of the originating host for direct logs submission. Required for direct logs submission (default is machine name). DD_LOGS_DIRECT_SUBMISSION_INTEGRATIONS
- Type:
string
List of direct log submission integrations to enable. Only selected integrations are enabled for direct log submission. Default is empty (direct log submission disabled). Supports multiple values separated with semi-colons. DD_LOGS_DIRECT_SUBMISSION_MAX_BATCH_SIZE
- Type:
int
Default: 1000
Maximum number of logs to send at one time. Default value is 1,000, the maximum accepted by the Datadog log API. DD_LOGS_DIRECT_SUBMISSION_MAX_QUEUE_SIZE
- Type:
int
Default: 100000
Maximum number of logs to hold in the internal queue at any one time. Default value is 100,000. DD_LOGS_DIRECT_SUBMISSION_MINIMUM_LEVEL
- Type:
string
Default: Information
Minimum level logs should have to be sent to the intake. Default value is Information. Should be one of Verbose,Debug,Information,Warning,Error,Fatal. DD_LOGS_DIRECT_SUBMISSION_SOURCE
- Type:
string
Default: csharp
Set the originating source for direct logs submission. Default is ‘csharp’ DD_LOGS_DIRECT_SUBMISSION_TAGS
- Type:
string
List of tags applied globally to all directly submitted logs. Supports multiple key-value pairs separated by commas, with keys and values separated by colons (for example Key1:Value1,Key2:Value2). If not provided, global tags are used instead. DD_LOGS_DIRECT_SUBMISSION_URL
- Type:
string
Default: https://http-intake.logs.datadoghq.com:443
URL to send logs to. Default value uses the domain set in ConfigurationKeys.Site, so defaults to https://http-intake.logs.datadoghq.com:443. DD_LOGS_INJECTION
- Type:
boolean
Default: true
Enables or disables automatic injection of correlation identifiers (trace ID, span ID) into application logs.
Language-specific notes:
- .NET: Your logger needs a
source that sets the trace_id mapping correctly. The default source for .NET applications, csharp, does this automatically.
DD_LOGS_OTEL_ENABLED
- Type:
boolean
Default: false
Enables collection and export of logs produced via the OpenTelemetry Logs API.
Runtime metrics collection and DogStatsD connection configuration for metric submission.
DD_DOGSTATSD_ARGS
- Type:
string
Azure App Services: extra command-line arguments appended when the tracer starts an external DogStatsD process (only used when DD_DOGSTATSD_PATH is set). DD_DOGSTATSD_PATH
- Type:
string
Azure App Services: path to the DogStatsD executable to run as an external process. When set, the tracer starts and supervises a dogstatsd process (passing DD_DOGSTATSD_ARGS) and optionally health-checks it using DD_DOGSTATSD_PIPE_NAME. DD_DOGSTATSD_PIPE_NAME
- Type:
string
Named pipe that DogStatsD binds to. Default value is null. DD_DOGSTATSD_PORT
- Type:
int
Default: 8125
The port of the DogStatsD Agent that metrics are submitted to. If the Agent configuration sets dogstatsd_port or DD_DOGSTATSD_PORT to something other than the default 8125, then this tracing library DD_DOGSTATSD_PORT must match it. DD_DOGSTATSD_SOCKET
- Type:
string
Unix domain socket that DogStatsD binds to. Default value is null. DD_DOGSTATSD_URL
- Type:
string
Default: udp://127.0.0.1:8125
The URL to use to connect the Datadog agent for Dogstatsd metrics. DD_RUNTIME_METRICS_DIAGNOSTICS_METRICS_API_ENABLED
- Type:
boolean
Default: false
Available starting with .NET 6. Controls whether the .NET SDK uses the System.Diagnostics.Metrics API to collect runtime metrics instead of the EventListener-based collector.
Default behavior: true on .NET 8+; on .NET 6/7, true only when DD_RUNTIME_METRICS_ENABLED is not explicitly set, otherwise false.
DD_RUNTIME_METRICS_ENABLED
- Type:
boolean
Default: false
Enables or disables the collection of runtime metrics (such as garbage collection stats, memory usage, and thread counts) for the application.
Data Streams Monitoring for tracking end-to-end latency across message queues and streaming pipelines.
DD_DATA_STREAMS_ENABLED
- Type:
boolean
Default: true
Enables data streams monitoring support. - Type:
boolean
Default: false
Enables legacy binary headers in Data Streams Monitoring. False by default if DSM is in default state, true otherwise. - Type:
array
Since: v3.42.0
Allows configuring Data Streams extractors for transaction tracking
Tracer self-reporting telemetry: heartbeat intervals, dependency and log collection, and telemetry forwarder configuration.
DD_INSTRUMENTATION_TELEMETRY_AGENTLESS_ENABLED
- Type:
boolean
Default: false
Sends telemetry directly to the intake when enabled and an API key is set. If the agent is unavailable, telemetry is sent directly to intake. Enabled by default when an API key is available. DD_INSTRUMENTATION_TELEMETRY_COMPRESSION_METHOD
- Type:
string
Default: gzip
Configuration key to allow telemetry compression. DD_INSTRUMENTATION_TELEMETRY_ENABLED
- Type:
boolean
Default: true
Allows Datadog to collect environmental and diagnostic information about your application and runtime to improve the product. Set to false to opt out of instrumentation telemetry. DD_TELEMETRY_DEPENDENCY_COLLECTION_ENABLED
- Type:
boolean
Default: true
Enables the instrumentation telemetry dependency collector, which detects application dependencies at runtime and reports them to Datadog. DD_TELEMETRY_LOG_COLLECTION_ENABLED
- Type:
boolean
Default: true
Controls whether internal tracer logs are forwarded as part of instrumentation telemetry. DD_TELEMETRY_METRICS_ENABLED
- Type:
boolean
Default: true
Controls whether instrumentation telemetry sends internal metrics.
Remote Configuration for receiving live configuration updates from Datadog.
DD_REMOTE_CONFIGURATION_ENABLED
- Type:
boolean
Default: true
Aliases:DD_REMOTE_CONFIG_ENABLED
Enable or disable remote configuration.
Standard OpenTelemetry environment variables supported by Datadog SDKs: resource attributes, propagators, trace sampler, OTLP exporter configuration, and batch span processor settings.
DD_METRICS_OTEL_ENABLED
- Type:
boolean
Default: false
Enables OpenTelemetry metrics export. Metrics are disabled by default and are only enabled when this is set to a truthy value. DD_METRICS_OTEL_METER_NAMES
- Type:
string
List of meters to add to the metrics exporter for the experimental OpenTelemetry Metrics API support. DD_TRACE_OTEL_ENABLED
- Type:
boolean
Default: false
Aliases:DD_TRACE_ACTIVITY_LISTENER_ENABLED
When true, OpenTelemetry-based tracing for custom instrumentation is enabled. OTEL_EXPORTER_OTLP_ENDPOINT
- Type:
string
Default: http://localhost:4317/
Configuration key to set the OTLP endpoint URL (fallback for metrics-specific endpoint). Used when ExporterOtlpMetricsEndpoint is not set. Expects values like unix:///path/to/socket.sock for UDS, \\.\pipename\ for Windows Named Pipes. Default values: gRPC: http://localhost:4317, HTTP: http://localhost:4318 - Type:
map
Configuration key to set custom headers for OTLP export (fallback for metrics-specific headers). Used when metrics-specific OTLP headers are not set. Format: api-key=key,other=value. OTEL_EXPORTER_OTLP_LOGS_ENDPOINT
- Type:
string
Default: http://localhost:4317/
Endpoint URL for log data only, with an optionally-specified port number. Typically ends with v1/logs when using OTLP/HTTP. - Type:
map
Aliases:OTEL_EXPORTER_OTLP_HEADERS
A map of headers to apply to all outgoing otlp logs. OTEL_EXPORTER_OTLP_LOGS_PROTOCOL
- Type:
string
Default: grpc
Aliases:OTEL_EXPORTER_OTLP_PROTOCOL
Specifies the OTLP transport protocol to be used for log data. OTEL_EXPORTER_OTLP_LOGS_TIMEOUT
- Type:
int
Default: 10000
Aliases:OTEL_EXPORTER_OTLP_TIMEOUT
The timeout value for all outgoing logs in milliseconds. OTEL_EXPORTER_OTLP_METRICS_ENDPOINT
- Type:
string
Default: http://localhost:4317/
Configuration key to set the OTLP endpoint URL for metrics. Takes precedence over ExporterOtlpEndpoint. This value typically ends with v1/metrics when using OTLP/HTTP. Expects values like unix:///path/to/socket.sock for UDS, \\.\pipename\ for Windows Named Pipes. Default values: gRPC: http://localhost:4317, HTTP: http://localhost:4318/v1/metrics - Type:
map
Aliases:OTEL_EXPORTER_OTLP_HEADERS
Configuration key to set custom headers for OTLP metrics export. Takes precedence over general OTLP headers. Format: api-key=key,other=value. OTEL_EXPORTER_OTLP_METRICS_PROTOCOL
- Type:
string
Default: grpc
Aliases:OTEL_EXPORTER_OTLP_PROTOCOL
Configuration key to set the OTLP protocol for metrics export. Takes precedence over the general OTLP protocol setting. Valid values: grpc, http/protobuf, http/json. Default: http/protobuf. OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE
- Type:
string
Default: delta
Controls metrics aggregation temporality. Accepted values: delta or cumulative (case-insensitive); empty/invalid values are treated as delta. OTEL_EXPORTER_OTLP_METRICS_TIMEOUT
- Type:
int
Default: 10000
Aliases:OTEL_EXPORTER_OTLP_TIMEOUT
Configuration key to set the request timeout for OTLP metrics export in milliseconds. Takes precedence over the general OTLP timeout setting. Default value is 10000ms. OTEL_EXPORTER_OTLP_PROTOCOL
- Type:
string
Default: grpc
Used as the fallback OTLP protocol for metrics when OTEL_EXPORTER_OTLP_METRICS_PROTOCOL is unset. Parsed values: grpc, http/protobuf, http/json (case-insensitive). Note: http/json is currently unsupported for metrics and disables metrics export; grpc/http/protobuf require the corresponding Cargo features (metrics-grpc/metrics-http). OTEL_EXPORTER_OTLP_TIMEOUT
- Type:
int
Default: 10000
Default timeout, in milliseconds, for OTLP export requests. Used as a fallback when a signal-specific timeout is not set. OTEL_EXPORTER_OTLP_TRACES_ENDPOINT
- Type:
string
Since: v3.41.0
Configuration key to set the OTLP endpoint URL for traces. Takes precedence over ExporterOtlpEndpoint. This value typically ends with v1/traces when using OTLP/HTTP. Expects values like unix:///path/to/socket.sock for UDS, \\.\pipename\ for Windows Named Pipes. Default values: gRPC: http://localhost:4317, HTTP: http://localhost:4318/v1/metrics - Type:
map
Since: v3.41.0
Aliases:OTEL_EXPORTER_OTLP_HEADERS
Configuration key to set custom headers for OTLP traces export. Takes precedence over general OTLP headers. Format: api-key=key,other=value. OTEL_EXPORTER_OTLP_TRACES_PROTOCOL
- Type:
string
Default: http/json
Since: v3.41.0
Aliases:OTEL_EXPORTER_OTLP_PROTOCOL
Configuration key to set the OTLP protocol for traces export. Takes precedence over the general OTLP protocol setting. Valid values: http/json. Default: http/json. OTEL_EXPORTER_OTLP_TRACES_TIMEOUT
- Type:
int
Default: 10000
Since: v3.41.0
Aliases:OTEL_EXPORTER_OTLP_TIMEOUT
Configuration key to set the request timeout for OTLP traces export in milliseconds. Takes precedence over the general OTLP timeout setting. Default value is 10000ms. OTEL_LOG_LEVEL
- Type:
string
Configuration key to set the log level. OTEL_LOGS_EXPORTER
- Type:
string
Default: otlp
Datadog SDKs that support OTLP log export should default to otlp; all others should default to None/null. OTEL_METRIC_EXPORT_INTERVAL
- Type:
int
Default: 10000
Interval, in milliseconds, between metric export attempts. The default of 10000 (10s) is Datadog’s recommended value and differs from the OpenTelemetry specification default of 60000 ms. OTEL_METRIC_EXPORT_TIMEOUT
- Type:
int
Default: 7500
Maximum time, in milliseconds, allowed to collect and export a single batch of metrics. The default of 7500 (7.5s) is Datadog’s recommended value and differs from the OpenTelemetry specification default of 30000 ms. OTEL_METRICS_EXPORTER
- Type:
string
Default: otlp
Specifies the OpenTelemetry metrics exporter. The only accepted values are otlp and none. Setting it to none disables both OTel metric emission and APM runtime metrics (equivalent to DD_RUNTIME_METRICS_ENABLED=false). OTEL_PROPAGATORS
- Type:
array
Configures which propagators are used for extracting and injecting trace context. OTEL_RESOURCE_ATTRIBUTES
- Type:
map
Set OpenTelemetry resource attributes as a list of (key, value) pairs. OTEL_SDK_DISABLED
- Type:
boolean
Disables the OpenTelemetry APIs. OTEL_SERVICE_NAME
- Type:
string
Sets the application’s default service name. Alias for DD_SERVICE when DD_SERVICE is not set. OTEL_TRACES_EXPORTER
- Type:
string
Since: v3.41.0
Configuration key to set the exporter for traces. We only recognize the values ‘otlp’ and ’none’. The value ‘otlp’ enables the experimental export of traces using OTLP. The value ’none’ disables the export of traces entirely, which is the equivalent of setting to false. OTEL_TRACES_SAMPLER
- Type:
string
Sets the trace sampler via OpenTelemetry configuration and maps it to the tracer’s sample rate when the corresponding setting is not set. Parent-based samplers are supported; unsupported values are ignored. OTEL_TRACES_SAMPLER_ARG
- Type:
decimal
Configuration key to set an additional argument for the traces sampler. to false. OTEL_TRACES_SPAN_METRICS_ENABLED
- Type:
boolean
Since: v3.49.0
Enables clientside computation and OTLP export of span trace metrics. When set to true, the tracer aggregates span data into a duration histogram (traces.span.sdk.metrics.duration) and exports it over OTLP (HTTP/protobuf or HTTP/JSON) to the configured OTLP metrics endpoint, instead of computing native client-side /v0.6/stats.
Instrumentation setup and platform-specific configuration: auto-injection, third-party library detection, and platform adapters.
DD_AAS_ENABLE_CUSTOM_METRICS
- Type:
boolean
Default: false
Used in Azure App Services to force the loader to start dogstatsd (in case automatic instrumentation is disabled) DD_AAS_ENABLE_CUSTOM_TRACING
- Type:
boolean
Default: false
Used in Azure App Services to force the loader to start the trace agent (in case automatic instrumentation is disabled) DD_DOTNET_TRACER_HOME
- Type:
string
Points to the home directory of the dotnet Datadog tracer. On Windows, it is often set to the installation path, such as C:\Program Files\Datadog.NET Tracer. On Linux/Docker, it is typically set to /opt/datadog. DD_INJECT_FORCE
- Type:
string
SSI variable that allows unsupported runtimes to be instrumented. Used for correlation purposes in telemetry. DD_THIRD_PARTY_DETECTION_EXCLUDES
- Type:
array
Default: []
Alias of DD_THIRD_PARTY_EXCLUDES. Live Debugging / Exception Replay: package prefixes to treat as first-party (exclude from the third-party library filter). This allowlist overrides the default third-party library list. DD_THIRD_PARTY_DETECTION_INCLUDES
- Type:
array
Default: []
Comma-separated list of libraries to include in third-party detection. Default value is empty.
Configuration keys that don't fit into the other categories yet. Treat this list as a backlog: each key here should eventually find a real home.
DD_EXPERIMENTAL_FLAGGING_PROVIDER_ENABLED
- Type:
boolean
Default: false
Enables the experimental feature-flag provider that evaluates flags from remote configuration. If not enabled, the provider is a no-op and returns default values.
Further reading
Additional helpful documentation, links, and articles: