OptionalapmUsed to disable APM Tracing when using standalone products
OptionalappsecConfiguration of the AppSec protection. Can be a boolean as an alias to appsec.enabled.
OptionalapiSecurity?: {Configuration for Api Security
Optionalenabled?: booleanWhether to enable Api Security.
OptionalendpointCollectionEnabled?: booleanWhether to enable endpoint collection for API Security.
OptionalendpointCollectionMessageLimit?: numberMaximum number of endpoints that can be serialized per message.
OptionalblockedTemplateGraphql?: stringSpecifies a path to a custom blocking template json file for graphql requests
OptionalblockedTemplateHtml?: stringSpecifies a path to a custom blocking template html file.
OptionalblockedTemplateJson?: stringSpecifies a path to a custom blocking template json file.
Optionalenabled?: booleanWhether to enable AppSec.
OptionaleventTracking?: {Controls the automated user event tracking configuration
Optionalmode?: 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'
OptionalextendedHeadersCollection?: { 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
OptionalobfuscatorKeyRegex?: stringSpecifies a regex that will redact sensitive data by its key in attack reports.
OptionalobfuscatorValueRegex?: stringSpecifies a regex that will redact sensitive data by its value in attack reports.
Optionalrasp?: { bodyCollection?: boolean; enabled?: boolean }Configuration for RASP
OptionalbodyCollection?: booleanWhether to enable request body collection on RASP event
Optionalenabled?: booleanWhether to enable RASP.
OptionalrateLimit?: numberControls the maximum amount of traces sampled by AppSec attacks, per second.
Optionalrules?: stringSpecifies a path to a custom rules file.
OptionalstackTrace?: { enabled?: boolean; maxDepth?: number; maxStackTraces?: number }Configuration for stack trace reporting
Optionalenabled?: booleanWhether to enable stack trace reporting.
OptionalmaxDepth?: numberSpecifies the maximum depth of a stack trace to be reported.
OptionalmaxStackTraces?: numberSpecifies the maximum number of stack traces to be reported.
OptionalwafTimeout?: numberControls the maximum amount of time in microseconds the WAF is allowed to run synchronously for.
OptionalclientWhether to enable client IP collection from relevant IP headers
OptionalclientCustom header name to source the http.client_ip tag from.
OptionalcloudCloud payload report as tags
OptionalmaxDepth?: numberMaximum depth of payload traversal for tags
Optionalrequest?: stringAdditional JSONPath queries to replace with redacted in request payloads
Undefined or invalid JSONPath queries disable the feature for requests.
Optionalresponse?: stringAdditional JSONPath queries to replace with redacted in response payloads
Undefined or invalid JSONPath queries disable the feature for responses.
OptionalcodeConfiguration for Code Origin for Spans.
OptionaldbmEnables DBM to APM link using tag injection.
OptionaldogstatsdOptions specific for the Dogstatsd agent.
OptionalenvSet an application’s environment e.g. prod, pre-prod, stage.
OptionalexperimentalExperimental features can be enabled individually using key / value pairs.
Optionalaiguard?: {Optionalenabled?: booleanSet to true to enable the SDK.
Optionalendpoint?: stringURL of the AI Guard REST API.
OptionalmaxContentSize?: numberMax size of the content property set in the meta-struct
OptionalmaxMessagesLength?: numberMaximum number of conversational messages allowed to be set in the meta-struct
Optionaltimeout?: numberTimeout used in calls to the AI Guard REST API in milliseconds (default 5000)
Optionalappsec?: { standalone?: { enabled?: boolean } }Optionalstandalone?: { enabled?: boolean }Configuration of Standalone ASM mode
Deprecated in favor of apmTracingEnabled.
Optionalenabled?: booleanWhether to enable Standalone ASM.
Optionalb3?: booleanOptionalenableGetRumData?: booleanWhether to enable the experimental getRumData method.
Optionalexporter?: "log" | "agent" | "datadog"Whether to write traces to log output or agentless, rather than send to an agent
Optional BetaflaggingProvider?: { enabled?: boolean }Configuration for Feature Flagging & Experimentation.
This feature is in preview and not ready for production use
Optionalenabled?: booleanWhether to enable the feature flagging provider. Requires Remote Config to be properly configured.
Optionaliast?: boolean | IastOptionsConfiguration of the IAST. Can be a boolean as an alias to iast.enabled.
OptionalruntimeId?: booleanWhether to add an auto-generated runtime-id tag to metrics.
Optionaltraceparent?: booleanOptionalflushInterval in milliseconds at which the tracer will submit traces to the agent.
OptionalflushNumber of spans before partially exporting a trace. This prevents keeping all the spans in memory for very large traces.
OptionalhostnameThe address of the trace agent that the tracer will submit to.
OptionaliastConfiguration of the IAST. Can be a boolean as an alias to iast.enabled.
OptionalllmobsConfiguration enabling LLM Observability. Enablement is superseded by the DD_LLMOBS_ENABLED environment variable.
OptionalloggerCustom 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
OptionallogWhether to enable trace ID injection in log records to be able to correlate traces with logs.
OptionallogA string representing the minimum tracer log level to use when debug logging is enabled
OptionallookupCustom function for DNS lookups when sending requests to the agent.
OptionalorphanableIf false, require a parent in order to trace.
OptionalpluginsWhether to load all built-in plugins.
OptionalportThe port of the trace agent that the tracer will submit to.
OptionalprofilingWhether to enable profiling.
OptionalpropagationThe selection and priority order of context propagation injection and extraction mechanisms.
OptionalprotocolProtocol 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.
OptionalrateGlobal 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.
OptionalremoteConfiguration of ASM Remote Configuration
OptionalreportWhether 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.
OptionalruntimeWhether to enable runtime metrics, or an object specifying whether to enable specific metric types.
OptionalsampleControls the ingestion sample rate (between 0 and 1) between the agent and the backend.
OptionalsamplingSampling 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.
OptionalscopeSpecifies 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.
OptionalserviceThe service name to be used for this program. If not set, the service name will attempted to be inferred from package.json
OptionalserviceProvide service name mappings for each plugin.
OptionalspanSpan sampling rules that take effect when the enclosing trace is dropped, to ingest single spans
OptionalstartupWhether to enable startup logs.
OptionaltagsGlobal tags that should be assigned to every span.
OptionalurlThe url of the trace agent that the tracer will submit to. Takes priority over hostname and port, if set.
OptionalversionThe 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.