Optional
appsecConfiguration of the AppSec protection. Can be a boolean as an alias to appsec.enabled
.
Optional
apiConfiguration for Api Security sampling
Optional
enabled?: booleanWhether to enable Api Security.
false
Optional
requestControls the request sampling rate (between 0 and 1) in which Api Security is triggered. The value will be coerced back if it's outside of the 0-1 range.
0.1
Optional
blockedSpecifies a path to a custom blocking template json file for graphql requests
Optional
blockedSpecifies a path to a custom blocking template html file.
Optional
blockedSpecifies a path to a custom blocking template json file.
Optional
enabled?: booleanWhether to enable AppSec.
false
Optional
eventControls the automated user event tracking configuration
Optional
mode?: "disabled" | "safe" | "extended"Controls the automated user event tracking mode. Possible values are disabled, safe and extended. On safe mode, any detected Personally Identifiable Information (PII) about the user will be redacted from the event. On extended mode, no redaction will take place.
'safe'
Optional
obfuscatorSpecifies a regex that will redact sensitive data by its key in attack reports.
Optional
obfuscatorSpecifies a regex that will redact sensitive data by its value in attack reports.
Optional
rasp?: { Configuration for RASP
Optional
enabled?: booleanWhether to enable RASP.
false
Optional
rateControls the maximum amount of traces sampled by AppSec attacks, per second.
100
Optional
rules?: stringSpecifies a path to a custom rules file.
Optional
stackConfiguration for stack trace reporting
Optional
enabled?: booleanWhether to enable stack trace reporting.
true
Optional
maxSpecifies the maximum depth of a stack trace to be reported.
32
Optional
maxSpecifies the maximum number of stack traces to be reported.
2
Optional
wafControls the maximum amount of time in microseconds the WAF is allowed to run synchronously for.
5000
Optional
clientWhether to enable client IP collection from relevant IP headers
false
Optional
clientCustom header name to source the http.client_ip tag from.
Optional
cloudCloud payload report as tags
Optional
maxMaximum 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
dbmEnables DBM to APM link using tag injection.
'disabled'
Optional
dogstatsdOptions specific for the Dogstatsd agent.
Optional
hostname?: stringThe hostname of the Dogstatsd agent that the metrics will submitted to.
Optional
port?: numberThe port of the Dogstatsd agent that the metrics will submitted to.
8125
Optional
envSet an application’s environment e.g. prod, pre-prod, stage.
Optional
experimentalExperimental features can be enabled individually using key / value pairs.
Optional
appsec?: { Optional
standalone?: { Configuration of Standalone ASM mode
Optional
enabled?: booleanWhether to enable Standalone ASM.
false
Optional
b3?: booleanOptional
enableWhether to enable the experimental getRumData
method.
false
Optional
exporter?: "log" | "agent" | "datadog"Whether to write traces to log output or agentless, rather than send to an agent
false
Optional
iast?: boolean | IastOptionsConfiguration of the IAST. Can be a boolean as an alias to iast.enabled
.
Optional
runtimeWhether to add an auto-generated runtime-id
tag to metrics.
false
Optional
traceparent?: boolean{}
Optional
flushInterval in milliseconds at which the tracer will submit traces to the agent.
2000
Optional
flushNumber of spans before partially exporting a trace. This prevents keeping all the spans in memory for very large traces.
1000
Optional
hostnameThe address of the trace agent that the tracer will submit to.
'localhost'
Optional
iastConfiguration of the IAST. Can be a boolean as an alias to iast.enabled
.
Optional
llmobsConfiguration enabling LLM Observability. Enablement is superceded by the DD_LLMOBS_ENABLED environment variable.
Optional
logWhether to enable trace ID injection in log records to be able to correlate traces with logs.
false
Optional
logA string representing the minimum tracer log level to use when debug logging is enabled
'debug'
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
lookupCustom function for DNS lookups when sending requests to the agent.
dns.lookup()
Optional
orphanableIf false, require a parent in order to trace.
true
since version 4.0
Optional
pluginsWhether to load all built-in plugins.
true
Optional
portThe port of the trace agent that the tracer will submit to.
8126
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.
0.4
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
pollSpecifies the remote configuration polling interval in seconds
5
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.
false
Optional
runtimeWhether to enable runtime metrics.
false
Optional
sampleControls the ingestion sample rate (between 0 and 1) between the agent and the backend.
Optional
samplingSampling rules to apply to priority samplin. 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.
true
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.
Generated using TypeDoc
List of options available to the tracer.