Optional
apmUsed to disable APM Tracing when using standalone products
Optional
appsecConfiguration of the AppSec protection. Can be a boolean as an alias to appsec.enabled
.
Optional
apiSecurity?: {Configuration for Api Security
Optional
enabled?: booleanWhether to enable Api Security.
Optional
endpointCollectionEnabled?: booleanWhether to enable endpoint collection for API Security.
Optional
endpointCollectionMessageLimit?: numberMaximum number of endpoints that can be serialized per message.
Optional
blockedTemplateGraphql?: stringSpecifies a path to a custom blocking template json file for graphql requests
Optional
blockedTemplateHtml?: stringSpecifies a path to a custom blocking template html file.
Optional
blockedTemplateJson?: stringSpecifies a path to a custom blocking template json file.
Optional
enabled?: booleanWhether to enable AppSec.
Optional
eventTracking?: {Controls the automated user event tracking configuration
Optional
mode?: Controls the automated user tracking mode for user IDs and logins collections. Possible values:
'anonymous': will hash user IDs and user logins before collecting them
'anon': alias for 'anonymous'
'safe': deprecated alias for 'anonymous'
'identification': will collect user IDs and logins without redaction
'ident': alias for 'identification'
'extended': deprecated alias for 'identification'
'disabled': will not collect user IDs and logins
Unknown values will be considered as 'disabled'
Optional
extendedHeadersCollection?: { enabled: boolean; maxHeaders: number; redaction: boolean }Configuration for extended headers collection tied to security events
Whether to enable extended headers collection
Specifies the maximum number of headers collected.
Whether to redact collected headers
Optional
obfuscatorKeyRegex?: stringSpecifies a regex that will redact sensitive data by its key in attack reports.
Optional
obfuscatorValueRegex?: stringSpecifies a regex that will redact sensitive data by its value in attack reports.
Optional
rasp?: { bodyCollection?: boolean; enabled?: boolean }Configuration for RASP
Optional
bodyCollection?: booleanWhether to enable request body collection on RASP event
Optional
enabled?: booleanWhether to enable RASP.
Optional
rateLimit?: numberControls the maximum amount of traces sampled by AppSec attacks, per second.
Optional
rules?: stringSpecifies a path to a custom rules file.
Optional
stackTrace?: { enabled?: boolean; maxDepth?: number; maxStackTraces?: number }Configuration for stack trace reporting
Optional
enabled?: booleanWhether to enable stack trace reporting.
Optional
maxDepth?: numberSpecifies the maximum depth of a stack trace to be reported.
Optional
maxStackTraces?: numberSpecifies the maximum number of stack traces to be reported.
Optional
wafTimeout?: numberControls the maximum amount of time in microseconds the WAF is allowed to run synchronously for.
Optional
clientWhether to enable client IP collection from relevant IP headers
Optional
clientCustom header name to source the http.client_ip tag from.
Optional
cloudCloud payload report as tags
Optional
maxDepth?: numberMaximum depth of payload traversal for tags
Optional
request?: stringAdditional JSONPath queries to replace with redacted
in request payloads
Undefined or invalid JSONPath queries disable the feature for requests.
Optional
response?: stringAdditional JSONPath queries to replace with redacted
in response payloads
Undefined or invalid JSONPath queries disable the feature for responses.
Optional
codeConfiguration for Code Origin for Spans.
Optional
dbmEnables DBM to APM link using tag injection.
Optional
dogstatsdOptions specific for the Dogstatsd agent.
Optional
envSet an application’s environment e.g. prod, pre-prod, stage.
Optional
experimentalExperimental features can be enabled individually using key / value pairs.
Optional
aiguard?: {Optional
enabled?: booleanSet to true
to enable the SDK.
Optional
endpoint?: stringURL of the AI Guard REST API.
Optional
maxContentSize?: numberMax size of the content property set in the meta-struct
Optional
maxMessagesLength?: numberMaximum number of conversational messages allowed to be set in the meta-struct
Optional
timeout?: numberTimeout used in calls to the AI Guard REST API in milliseconds (default 5000)
Optional
appsec?: { standalone?: { enabled?: boolean } }Optional
standalone?: { enabled?: boolean }Configuration of Standalone ASM mode
Deprecated in favor of apmTracingEnabled
.
Optional
enabled?: booleanWhether to enable Standalone ASM.
Optional
b3?: booleanOptional
enableGetRumData?: booleanWhether to enable the experimental getRumData
method.
Optional
exporter?: "log" | "agent" | "datadog"Whether to write traces to log output or agentless, rather than send to an agent
Optional
iast?: boolean | IastOptionsConfiguration of the IAST. Can be a boolean as an alias to iast.enabled
.
Optional
runtimeId?: booleanWhether to add an auto-generated runtime-id
tag to metrics.
Optional
traceparent?: booleanOptional
flushInterval in milliseconds at which the tracer will submit traces to the agent.
Optional
flushNumber of spans before partially exporting a trace. This prevents keeping all the spans in memory for very large traces.
Optional
hostnameThe address of the trace agent that the tracer will submit to.
Optional
iastConfiguration of the IAST. Can be a boolean as an alias to iast.enabled
.
Optional
llmobsConfiguration enabling LLM Observability. Enablement is superseded by the DD_LLMOBS_ENABLED environment variable.
Optional
loggerCustom logger to be used by the tracer (if debug = true), should support error(), warn(), info(), and debug() methods see https://datadog.github.io/dd-trace-js/#custom-logging
Optional
logWhether to enable trace ID injection in log records to be able to correlate traces with logs.
Optional
logA string representing the minimum tracer log level to use when debug logging is enabled
Optional
lookupCustom function for DNS lookups when sending requests to the agent.
Optional
orphanableIf false, require a parent in order to trace.
Optional
pluginsWhether to load all built-in plugins.
Optional
portThe port of the trace agent that the tracer will submit to.
Optional
profilingWhether to enable profiling.
Optional
propagationThe selection and priority order of context propagation injection and extraction mechanisms.
Optional
protocolProtocol version to use for requests to the agent. The version configured must be supported by the agent version installed or all traces will be dropped.
Optional
rateGlobal rate limit that is applied on the global sample rate and all rules, and controls the ingestion rate limit between the agent and the backend. Defaults to deferring the decision to the agent.
Optional
remoteConfiguration of ASM Remote Configuration
Optional
reportWhether to report the hostname of the service host. This is used when the agent is deployed on a different host and cannot determine the hostname automatically.
Optional
runtimeWhether to enable runtime metrics, or an object specifying whether to enable specific metric types.
Optional
sampleControls the ingestion sample rate (between 0 and 1) between the agent and the backend.
Optional
samplingSampling rules to apply to priority sampling. Each rule is a JSON,
consisting of service
and name
, which are regexes to match against
a trace's service
and name
, and a corresponding sampleRate
. If not
specified, will defer to global sampling rate for all spans.
Optional
scopeSpecifies which scope implementation to use. The default is to use the best implementation for the runtime. Only change this if you know what you are doing.
Optional
serviceThe service name to be used for this program. If not set, the service name will attempted to be inferred from package.json
Optional
serviceProvide service name mappings for each plugin.
Optional
spanSpan sampling rules that take effect when the enclosing trace is dropped, to ingest single spans
Optional
startupWhether to enable startup logs.
Optional
tagsGlobal tags that should be assigned to every span.
Optional
urlThe url of the trace agent that the tracer will submit to. Takes priority over hostname and port, if set.
Optional
versionThe version number of the application. If not set, the version will attempted to be inferred from package.json.
List of options available to the tracer.