dd-trace 5.123.0 → 6.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE-3rdparty.csv +0 -5
- package/index.d.ts +25 -240
- package/package.json +18 -19
- package/packages/datadog-instrumentations/src/cucumber.js +4 -4
- package/packages/datadog-instrumentations/src/mocha/utils.js +2 -5
- package/packages/datadog-instrumentations/src/playwright-reporter.js +1 -149
- package/packages/datadog-instrumentations/src/playwright.js +33 -33
- package/packages/datadog-instrumentations/src/vitest-main-no-worker-init.js +8 -6
- package/packages/datadog-plugin-playwright/src/index.js +0 -4
- package/packages/dd-trace/src/appsec/reporter.js +0 -2
- package/packages/dd-trace/src/appsec/telemetry/index.js +0 -13
- package/packages/dd-trace/src/appsec/telemetry/rasp.js +0 -16
- package/packages/dd-trace/src/appsec/telemetry/waf.js +0 -24
- package/packages/dd-trace/src/carrier.js +48 -107
- package/packages/dd-trace/src/ci-visibility/early-flake-detection/get-known-tests.js +5 -5
- package/packages/dd-trace/src/ci-visibility/exporters/agent-proxy/index.js +0 -2
- package/packages/dd-trace/src/ci-visibility/exporters/agentless/coverage-writer.js +3 -5
- package/packages/dd-trace/src/ci-visibility/exporters/agentless/writer.js +2 -4
- package/packages/dd-trace/src/ci-visibility/exporters/git/git_metadata.js +4 -6
- package/packages/dd-trace/src/ci-visibility/intelligent-test-runner/get-skippable-suites.js +3 -5
- package/packages/dd-trace/src/ci-visibility/requests/get-library-configuration.js +2 -4
- package/packages/dd-trace/src/ci-visibility/requests/upload-coverage-report.js +2 -4
- package/packages/dd-trace/src/ci-visibility/requests/upload-test-screenshot.js +2 -4
- package/packages/dd-trace/src/ci-visibility/test-management/get-test-management-tests.js +5 -5
- package/packages/dd-trace/src/debugger/constants.js +0 -1
- package/packages/dd-trace/src/debugger/devtools_client/condition.js +1 -1
- package/packages/dd-trace/src/debugger/devtools_client/index.js +10 -3
- package/packages/dd-trace/src/debugger/index.js +2 -4
- package/packages/dd-trace/src/exporters/common/request.js +2 -5
- package/packages/dd-trace/src/llmobs/experiments/client.js +2 -6
- package/packages/dd-trace/src/llmobs/experiments/dataset.js +11 -249
- package/packages/dd-trace/src/llmobs/experiments/experiment.js +10 -23
- package/packages/dd-trace/src/llmobs/experiments/index.js +6 -18
- package/packages/dd-trace/src/llmobs/experiments/noop.js +4 -64
- package/packages/dd-trace/src/llmobs/experiments/util.js +4 -60
- package/packages/dd-trace/src/openfeature/constants/constants.js +18 -0
- package/packages/dd-trace/src/openfeature/index.js +4 -7
- package/packages/dd-trace/src/openfeature/writers/base.js +11 -153
- package/packages/dd-trace/src/openfeature/writers/exposures.js +14 -62
- package/packages/dd-trace/src/openfeature/writers/util.js +15 -97
- package/packages/dd-trace/src/opentracing/propagation/text_map.js +13 -22
- package/packages/dd-trace/src/telemetry/metrics.js +8 -62
- package/packages/dd-trace/src/telemetry/send-data.js +0 -1
- package/vendor/dist/@datadog/sketches-js/index.js +1 -1
- package/vendor/dist/protobufjs/index.js +1 -1
- package/vendor/dist/protobufjs/minimal/index.js +1 -1
- package/packages/dd-trace/src/debugger/inspect-segment.js +0 -154
- package/packages/dd-trace/src/evp_proxy/constants.js +0 -8
- package/packages/dd-trace/src/evp_proxy/direct.js +0 -64
- package/packages/dd-trace/src/evp_proxy/discovery.js +0 -133
- package/packages/dd-trace/src/evp_proxy/path.js +0 -22
- package/vendor/dist/https-proxy-agent/LICENSE +0 -22
- package/vendor/dist/https-proxy-agent/index.js +0 -4
- package/vendor/dist/proxy-from-env/LICENSE +0 -20
- package/vendor/dist/proxy-from-env/index.js +0 -1
package/LICENSE-3rdparty.csv
CHANGED
|
@@ -44,21 +44,18 @@
|
|
|
44
44
|
"@oxc-project/types","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
45
45
|
"@tybys/wasm-util","https://github.com/toyobayashi/wasm-util","['MIT']","['toyobayashi']"
|
|
46
46
|
"@types/estree","https://github.com/DefinitelyTyped/DefinitelyTyped","['MIT']","['DefinitelyTyped']"
|
|
47
|
-
"agent-base","https://github.com/TooTallNate/proxy-agents","['MIT']","['Nathan Rajlich']"
|
|
48
47
|
"argparse","https://github.com/nodeca/argparse","['Python-2.0']","['nodeca']"
|
|
49
48
|
"astring","https://github.com/davidbonnet/astring","['MIT']","['David Bonnet']"
|
|
50
49
|
"cjs-module-lexer","https://github.com/nodejs/cjs-module-lexer","['MIT']","['Guy Bedford']"
|
|
51
50
|
"crypto-randomuuid","npm:crypto-randomuuid","['MIT']","['Stephen Belanger']"
|
|
52
51
|
"dc-polyfill","https://github.com/DataDog/dc-polyfill","['MIT']","['Thomas Hunter II']"
|
|
53
52
|
"dd-trace","https://github.com/DataDog/dd-trace-js","['(Apache-2.0 OR BSD-3-Clause)']","['Datadog Inc. <info@datadoghq.com>']"
|
|
54
|
-
"debug","https://github.com/debug-js/debug","['MIT']","['Josh Junon']"
|
|
55
53
|
"detect-newline","https://github.com/sindresorhus/detect-newline","['MIT']","['Sindre Sorhus']"
|
|
56
54
|
"es-module-lexer","https://github.com/guybedford/es-module-lexer","['MIT']","['Guy Bedford']"
|
|
57
55
|
"escape-string-regexp","https://github.com/sindresorhus/escape-string-regexp","['MIT']","['Sindre Sorhus']"
|
|
58
56
|
"esquery","https://github.com/estools/esquery","['BSD-3-Clause']","['Joel Feenstra']"
|
|
59
57
|
"estraverse","https://github.com/estools/estraverse","['BSD-2-Clause']","['estools']"
|
|
60
58
|
"fast-fifo","https://github.com/mafintosh/fast-fifo","['MIT']","['Mathias Buus']"
|
|
61
|
-
"https-proxy-agent","https://github.com/TooTallNate/proxy-agents","['MIT']","['Nathan Rajlich']"
|
|
62
59
|
"import-in-the-middle","https://github.com/nodejs/import-in-the-middle","['Apache-2.0']","['Bryan English']"
|
|
63
60
|
"istanbul-lib-coverage","https://github.com/istanbuljs/istanbuljs","['BSD-3-Clause']","['Krishnan Anantheswaran']"
|
|
64
61
|
"jest-docblock","https://github.com/jestjs/jest","['MIT']","['jestjs']"
|
|
@@ -71,7 +68,6 @@
|
|
|
71
68
|
"lru-cache","https://github.com/isaacs/node-lru-cache","['ISC']","['Isaac Z. Schlueter']"
|
|
72
69
|
"meriyah","https://github.com/meriyah/meriyah","['ISC']","['Kenny F.']"
|
|
73
70
|
"module-details-from-path","https://github.com/watson/module-details-from-path","['MIT']","['Thomas Watson']"
|
|
74
|
-
"ms","https://github.com/vercel/ms","['MIT']","['vercel']"
|
|
75
71
|
"mutexify","https://github.com/mafintosh/mutexify","['MIT']","['Mathias Buus']"
|
|
76
72
|
"node-addon-api","https://github.com/nodejs/node-addon-api","['MIT']","['nodejs']"
|
|
77
73
|
"node-gyp-build","https://github.com/prebuild/node-gyp-build","['MIT']","['Mathias Buus']"
|
|
@@ -79,7 +75,6 @@
|
|
|
79
75
|
"oxc-parser","https://github.com/oxc-project/oxc","['MIT']","['Boshen and oxc contributors']"
|
|
80
76
|
"pprof-format","https://github.com/DataDog/pprof-format","['MIT']","['Datadog Inc.']"
|
|
81
77
|
"protobufjs","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
|
|
82
|
-
"proxy-from-env","https://github.com/Rob--W/proxy-from-env","['MIT']","['Rob Wu']"
|
|
83
78
|
"queue-tick","https://github.com/mafintosh/queue-tick","['MIT']","['Mathias Buus']"
|
|
84
79
|
"retry","https://github.com/tim-kos/node-retry","['MIT']","['Tim Koschützki']"
|
|
85
80
|
"rfdc","https://github.com/davidmarkclements/rfdc","['MIT']","['David Mark Clements']"
|
package/index.d.ts
CHANGED
|
@@ -224,8 +224,8 @@ interface Tracer extends opentracing.Tracer {
|
|
|
224
224
|
removeAllBaggageItems (): Record<string, string>;
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
//
|
|
228
|
-
//
|
|
227
|
+
// Left out of the namespace, so it doesn't need to be exported for Tracer.
|
|
228
|
+
// Only include plugins here that can be either disabled or configured.
|
|
229
229
|
/** @hidden */
|
|
230
230
|
interface Plugins {
|
|
231
231
|
"aerospike": tracer.plugins.aerospike;
|
|
@@ -261,7 +261,6 @@ interface Plugins {
|
|
|
261
261
|
"fetch": tracer.plugins.fetch;
|
|
262
262
|
"find-my-way": tracer.plugins.find_my_way;
|
|
263
263
|
"fs": tracer.plugins.fs;
|
|
264
|
-
"generic-pool": tracer.plugins.generic_pool;
|
|
265
264
|
"google-cloud-pubsub": tracer.plugins.google_cloud_pubsub;
|
|
266
265
|
"google-cloud-vertexai": tracer.plugins.google_cloud_vertexai;
|
|
267
266
|
"google-genai": tracer.plugins.google_genai;
|
|
@@ -275,7 +274,6 @@ interface Plugins {
|
|
|
275
274
|
"iovalkey": tracer.plugins.iovalkey;
|
|
276
275
|
"jest": tracer.plugins.jest;
|
|
277
276
|
"kafkajs": tracer.plugins.kafkajs;
|
|
278
|
-
"knex": tracer.plugins.knex;
|
|
279
277
|
"koa": tracer.plugins.koa;
|
|
280
278
|
"langchain": tracer.plugins.langchain;
|
|
281
279
|
"langgraph": tracer.plugins.langgraph;
|
|
@@ -368,17 +366,6 @@ declare namespace tracer {
|
|
|
368
366
|
export interface Span extends opentracing.Span {
|
|
369
367
|
context (): SpanContext;
|
|
370
368
|
|
|
371
|
-
/**
|
|
372
|
-
* Causally links another span to the current span
|
|
373
|
-
*
|
|
374
|
-
* @deprecated In favor of addLink(link: { context: SpanContext, attributes?: Object }).
|
|
375
|
-
* This will be removed in the next major version.
|
|
376
|
-
* @param {SpanContext} context The context of the span to link to.
|
|
377
|
-
* @param {Object} attributes An optional key value pair of arbitrary values.
|
|
378
|
-
* @returns {void}
|
|
379
|
-
*/
|
|
380
|
-
addLink (context: SpanContext, attributes?: Object): void;
|
|
381
|
-
|
|
382
369
|
/**
|
|
383
370
|
* Adds a single link to the span.
|
|
384
371
|
*
|
|
@@ -731,28 +718,6 @@ declare namespace tracer {
|
|
|
731
718
|
*/
|
|
732
719
|
protocolVersion?: string
|
|
733
720
|
|
|
734
|
-
/**
|
|
735
|
-
* Deprecated in favor of the global versions of the variables provided under this option
|
|
736
|
-
*
|
|
737
|
-
* @deprecated
|
|
738
|
-
* @hidden
|
|
739
|
-
*/
|
|
740
|
-
ingestion?: {
|
|
741
|
-
/**
|
|
742
|
-
* Controls the ingestion sample rate (between 0 and 1) between the agent and the backend.
|
|
743
|
-
* @env DD_TRACE_SAMPLE_RATE
|
|
744
|
-
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
745
|
-
*/
|
|
746
|
-
sampleRate?: number
|
|
747
|
-
|
|
748
|
-
/**
|
|
749
|
-
* Controls the ingestion rate limit between the agent and the backend. Defaults to deferring the decision to the agent.
|
|
750
|
-
* @env DD_TRACE_RATE_LIMIT
|
|
751
|
-
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
752
|
-
*/
|
|
753
|
-
rateLimit?: number
|
|
754
|
-
};
|
|
755
|
-
|
|
756
721
|
/**
|
|
757
722
|
* Whether to enable inferred proxy services.
|
|
758
723
|
* @default false
|
|
@@ -775,19 +740,12 @@ declare namespace tracer {
|
|
|
775
740
|
*/
|
|
776
741
|
experimental?: {
|
|
777
742
|
|
|
778
|
-
/**
|
|
779
|
-
* @default false
|
|
780
|
-
* @env DD_TRACE_EXPERIMENTAL_B3_ENABLED
|
|
781
|
-
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
782
|
-
*/
|
|
783
|
-
b3?: boolean
|
|
784
|
-
|
|
785
743
|
/**
|
|
786
744
|
* Whether to write traces to log output or agentless, rather than send to an agent
|
|
787
745
|
* @env DD_TRACE_EXPERIMENTAL_EXPORTER
|
|
788
746
|
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
789
747
|
*/
|
|
790
|
-
exporter?: 'log' | 'agent' | 'datadog'
|
|
748
|
+
exporter?: 'log' | 'agent' | 'datadog' | 'electron'
|
|
791
749
|
|
|
792
750
|
/**
|
|
793
751
|
* Whether to enable the experimental `getRumData` method.
|
|
@@ -797,34 +755,6 @@ declare namespace tracer {
|
|
|
797
755
|
*/
|
|
798
756
|
enableGetRumData?: boolean
|
|
799
757
|
|
|
800
|
-
/**
|
|
801
|
-
* Configuration of the IAST. Can be a boolean as an alias to `iast.enabled`.
|
|
802
|
-
* @deprecated Please use the non-experimental `iast` option instead.
|
|
803
|
-
*/
|
|
804
|
-
iast?: boolean | IastOptions
|
|
805
|
-
|
|
806
|
-
/**
|
|
807
|
-
* Configuration of the AppSec. Can be a boolean as an alias to `appsec.enabled`.
|
|
808
|
-
* @deprecated Please use the non-experimental `appsec` option instead.
|
|
809
|
-
*/
|
|
810
|
-
appsec?: boolean | {
|
|
811
|
-
/**
|
|
812
|
-
* Configuration of Standalone ASM mode
|
|
813
|
-
* Deprecated in favor of `apmTracingEnabled`.
|
|
814
|
-
*
|
|
815
|
-
* @deprecated Please use `apmTracingEnabled` instead.
|
|
816
|
-
*/
|
|
817
|
-
standalone?: {
|
|
818
|
-
/**
|
|
819
|
-
* Whether to enable Standalone ASM.
|
|
820
|
-
* @default false
|
|
821
|
-
* @env DD_EXPERIMENTAL_APPSEC_STANDALONE_ENABLED
|
|
822
|
-
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
823
|
-
*/
|
|
824
|
-
enabled?: boolean
|
|
825
|
-
}
|
|
826
|
-
} | TracerOptions['appsec'],
|
|
827
|
-
|
|
828
758
|
aiguard?: {
|
|
829
759
|
/**
|
|
830
760
|
* Set to `true` to enable the SDK.
|
|
@@ -1126,15 +1056,6 @@ declare namespace tracer {
|
|
|
1126
1056
|
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
1127
1057
|
*/
|
|
1128
1058
|
enabled?: boolean,
|
|
1129
|
-
|
|
1130
|
-
/** Whether to enable request body collection on RASP event
|
|
1131
|
-
* @default false
|
|
1132
|
-
*
|
|
1133
|
-
* @deprecated Use UI and Remote Configuration to enable extended data collection
|
|
1134
|
-
* @env DD_APPSEC_RASP_COLLECT_REQUEST_BODY
|
|
1135
|
-
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
1136
|
-
*/
|
|
1137
|
-
bodyCollection?: boolean
|
|
1138
1059
|
},
|
|
1139
1060
|
/**
|
|
1140
1061
|
* Configuration for stack trace reporting
|
|
@@ -1161,39 +1082,6 @@ declare namespace tracer {
|
|
|
1161
1082
|
*/
|
|
1162
1083
|
maxDepth?: number,
|
|
1163
1084
|
},
|
|
1164
|
-
/**
|
|
1165
|
-
* Configuration for extended headers collection tied to security events
|
|
1166
|
-
*
|
|
1167
|
-
* @deprecated Use UI and Remote Configuration to enable extended data collection
|
|
1168
|
-
*/
|
|
1169
|
-
extendedHeadersCollection?: {
|
|
1170
|
-
/** Whether to enable extended headers collection
|
|
1171
|
-
* @default false
|
|
1172
|
-
*
|
|
1173
|
-
* @deprecated Use UI and Remote Configuration to enable extended data collection
|
|
1174
|
-
* @env DD_APPSEC_COLLECT_ALL_HEADERS
|
|
1175
|
-
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
1176
|
-
*/
|
|
1177
|
-
enabled: boolean,
|
|
1178
|
-
|
|
1179
|
-
/** Whether to redact collected headers
|
|
1180
|
-
* @default true
|
|
1181
|
-
*
|
|
1182
|
-
* @deprecated Use UI and Remote Configuration to enable extended data collection
|
|
1183
|
-
* @env DD_APPSEC_HEADER_COLLECTION_REDACTION_ENABLED
|
|
1184
|
-
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
1185
|
-
*/
|
|
1186
|
-
redaction: boolean,
|
|
1187
|
-
|
|
1188
|
-
/** Specifies the maximum number of headers collected.
|
|
1189
|
-
* @default 50
|
|
1190
|
-
*
|
|
1191
|
-
* @deprecated Use UI and Remote Configuration to enable extended data collection
|
|
1192
|
-
* @env DD_APPSEC_MAX_COLLECTED_HEADERS
|
|
1193
|
-
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
1194
|
-
*/
|
|
1195
|
-
maxHeaders: number,
|
|
1196
|
-
}
|
|
1197
1085
|
}
|
|
1198
1086
|
|
|
1199
1087
|
/**
|
|
@@ -1380,7 +1268,7 @@ declare namespace tracer {
|
|
|
1380
1268
|
|
|
1381
1269
|
/**
|
|
1382
1270
|
* Whether to use Datadog legacy baggage extraction and injection behavior.
|
|
1383
|
-
* @default
|
|
1271
|
+
* @default true
|
|
1384
1272
|
* @env DD_TRACE_LEGACY_BAGGAGE_ENABLED
|
|
1385
1273
|
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
1386
1274
|
*/
|
|
@@ -2092,14 +1980,6 @@ declare namespace tracer {
|
|
|
2092
1980
|
*/
|
|
2093
1981
|
allowlist?: string | RegExp | ((urlOrPath: string) => boolean) | (string | RegExp | ((urlOrPath: string) => boolean))[];
|
|
2094
1982
|
|
|
2095
|
-
/**
|
|
2096
|
-
* Deprecated in favor of `allowlist`.
|
|
2097
|
-
*
|
|
2098
|
-
* @deprecated
|
|
2099
|
-
* @hidden
|
|
2100
|
-
*/
|
|
2101
|
-
whitelist?: string | RegExp | ((urlOrPath: string) => boolean) | (string | RegExp | ((urlOrPath: string) => boolean))[];
|
|
2102
|
-
|
|
2103
1983
|
/**
|
|
2104
1984
|
* List of URLs/paths that should not be instrumented. Takes precedence over
|
|
2105
1985
|
* allowlist if a URL matches an entry in both.
|
|
@@ -2112,14 +1992,6 @@ declare namespace tracer {
|
|
|
2112
1992
|
*/
|
|
2113
1993
|
blocklist?: string | RegExp | ((urlOrPath: string) => boolean) | (string | RegExp | ((urlOrPath: string) => boolean))[];
|
|
2114
1994
|
|
|
2115
|
-
/**
|
|
2116
|
-
* Deprecated in favor of `blocklist`.
|
|
2117
|
-
*
|
|
2118
|
-
* @deprecated
|
|
2119
|
-
* @hidden
|
|
2120
|
-
*/
|
|
2121
|
-
blacklist?: string | RegExp | ((urlOrPath: string) => boolean) | (string | RegExp | ((urlOrPath: string) => boolean))[];
|
|
2122
|
-
|
|
2123
1995
|
/**
|
|
2124
1996
|
* Custom filter function used to decide whether a URL/path is allowed.
|
|
2125
1997
|
* When provided, this takes precedence over allowlist/blocklist configuration.
|
|
@@ -2333,15 +2205,15 @@ declare namespace tracer {
|
|
|
2333
2205
|
|
|
2334
2206
|
/**
|
|
2335
2207
|
* This plugin automatically instruments the
|
|
2336
|
-
* [
|
|
2208
|
+
* [anthropic](https://www.npmjs.com/package/@anthropic-ai/sdk) module.
|
|
2337
2209
|
*/
|
|
2338
|
-
interface
|
|
2210
|
+
interface anthropic extends Instrumentation {}
|
|
2339
2211
|
|
|
2340
2212
|
/**
|
|
2341
2213
|
* This plugin automatically instruments the
|
|
2342
|
-
* [anthropic](https://www.npmjs.com/package/@anthropic-ai/sdk) module.
|
|
2214
|
+
* [@anthropic-ai/claude-agent-sdk](https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk) module.
|
|
2343
2215
|
*/
|
|
2344
|
-
interface
|
|
2216
|
+
interface claude_agent_sdk extends Instrumentation {}
|
|
2345
2217
|
|
|
2346
2218
|
/**
|
|
2347
2219
|
* Currently this plugin automatically instruments
|
|
@@ -2621,12 +2493,6 @@ declare namespace tracer {
|
|
|
2621
2493
|
*/
|
|
2622
2494
|
interface fs extends Instrumentation {}
|
|
2623
2495
|
|
|
2624
|
-
/**
|
|
2625
|
-
* This plugin patches the [generic-pool](https://github.com/coopernurse/node-pool)
|
|
2626
|
-
* module to bind the callbacks the the caller context.
|
|
2627
|
-
*/
|
|
2628
|
-
interface generic_pool extends Integration {}
|
|
2629
|
-
|
|
2630
2496
|
/**
|
|
2631
2497
|
* This plugin automatically instruments the
|
|
2632
2498
|
* [@google-cloud/pubsub](https://github.com/googleapis/nodejs-pubsub) module.
|
|
@@ -2704,6 +2570,8 @@ declare namespace tracer {
|
|
|
2704
2570
|
/**
|
|
2705
2571
|
* The maximum depth of fields/resolvers to instrument. Set to `0` to only
|
|
2706
2572
|
* instrument the operation or to `-1` to instrument all fields/resolvers.
|
|
2573
|
+
* Counts selection-set nesting (named fields) only; list indices do not
|
|
2574
|
+
* count toward the limit, regardless of `collapse`.
|
|
2707
2575
|
*
|
|
2708
2576
|
* @default -1
|
|
2709
2577
|
* @env DD_TRACE_GRAPHQL_DEPTH
|
|
@@ -2866,14 +2734,6 @@ declare namespace tracer {
|
|
|
2866
2734
|
*/
|
|
2867
2735
|
allowlist?: string | RegExp | ((command: string) => boolean) | (string | RegExp | ((command: string) => boolean))[];
|
|
2868
2736
|
|
|
2869
|
-
/**
|
|
2870
|
-
* Deprecated in favor of `allowlist`.
|
|
2871
|
-
*
|
|
2872
|
-
* @deprecated
|
|
2873
|
-
* @hidden
|
|
2874
|
-
*/
|
|
2875
|
-
whitelist?: string | RegExp | ((command: string) => boolean) | (string | RegExp | ((command: string) => boolean))[];
|
|
2876
|
-
|
|
2877
2737
|
/**
|
|
2878
2738
|
* List of commands that should not be instrumented. Takes precedence over
|
|
2879
2739
|
* allowlist if a command matches an entry in both. Commands must be in
|
|
@@ -2883,14 +2743,6 @@ declare namespace tracer {
|
|
|
2883
2743
|
*/
|
|
2884
2744
|
blocklist?: string | RegExp | ((command: string) => boolean) | (string | RegExp | ((command: string) => boolean))[];
|
|
2885
2745
|
|
|
2886
|
-
/**
|
|
2887
|
-
* Deprecated in favor of `blocklist`.
|
|
2888
|
-
*
|
|
2889
|
-
* @deprecated
|
|
2890
|
-
* @hidden
|
|
2891
|
-
*/
|
|
2892
|
-
blacklist?: string | RegExp | ((command: string) => boolean) | (string | RegExp | ((command: string) => boolean))[];
|
|
2893
|
-
|
|
2894
2746
|
/**
|
|
2895
2747
|
* Custom filter function used to decide whether a Redis command should be instrumented.
|
|
2896
2748
|
* When provided, this takes precedence over allowlist/blocklist configuration.
|
|
@@ -2923,14 +2775,6 @@ declare namespace tracer {
|
|
|
2923
2775
|
*/
|
|
2924
2776
|
allowlist?: string | RegExp | ((command: string) => boolean) | (string | RegExp | ((command: string) => boolean))[];
|
|
2925
2777
|
|
|
2926
|
-
/**
|
|
2927
|
-
* Deprecated in favor of `allowlist`.
|
|
2928
|
-
*
|
|
2929
|
-
* @deprecated
|
|
2930
|
-
* @hidden
|
|
2931
|
-
*/
|
|
2932
|
-
whitelist?: string | RegExp | ((command: string) => boolean) | (string | RegExp | ((command: string) => boolean))[];
|
|
2933
|
-
|
|
2934
2778
|
/**
|
|
2935
2779
|
* List of commands that should not be instrumented. Takes precedence over
|
|
2936
2780
|
* allowlist if a command matches an entry in both. Commands must be in
|
|
@@ -2940,14 +2784,6 @@ declare namespace tracer {
|
|
|
2940
2784
|
*/
|
|
2941
2785
|
blocklist?: string | RegExp | ((command: string) => boolean) | (string | RegExp | ((command: string) => boolean))[];
|
|
2942
2786
|
|
|
2943
|
-
/**
|
|
2944
|
-
* Deprecated in favor of `blocklist`.
|
|
2945
|
-
*
|
|
2946
|
-
* @deprecated
|
|
2947
|
-
* @hidden
|
|
2948
|
-
*/
|
|
2949
|
-
blacklist?: string | RegExp | ((command: string) => boolean) | (string | RegExp | ((command: string) => boolean))[];
|
|
2950
|
-
|
|
2951
2787
|
/**
|
|
2952
2788
|
* Custom filter function used to decide whether a Valkey command should be instrumented.
|
|
2953
2789
|
* When provided, this takes precedence over allowlist/blocklist configuration.
|
|
@@ -2973,12 +2809,6 @@ declare namespace tracer {
|
|
|
2973
2809
|
*/
|
|
2974
2810
|
interface jest extends Integration {}
|
|
2975
2811
|
|
|
2976
|
-
/**
|
|
2977
|
-
* This plugin patches the [knex](https://knexjs.org/)
|
|
2978
|
-
* module to bind the promise callback the the caller context.
|
|
2979
|
-
*/
|
|
2980
|
-
interface knex extends Integration {}
|
|
2981
|
-
|
|
2982
2812
|
/**
|
|
2983
2813
|
* This plugin automatically instruments the
|
|
2984
2814
|
* [koa](https://koajs.com/) module.
|
|
@@ -3253,14 +3083,6 @@ declare namespace tracer {
|
|
|
3253
3083
|
*/
|
|
3254
3084
|
allowlist?: string | RegExp | ((command: string) => boolean) | (string | RegExp | ((command: string) => boolean))[];
|
|
3255
3085
|
|
|
3256
|
-
/**
|
|
3257
|
-
* Deprecated in favor of `allowlist`.
|
|
3258
|
-
*
|
|
3259
|
-
* deprecated
|
|
3260
|
-
* @hidden
|
|
3261
|
-
*/
|
|
3262
|
-
whitelist?: string | RegExp | ((command: string) => boolean) | (string | RegExp | ((command: string) => boolean))[];
|
|
3263
|
-
|
|
3264
3086
|
/**
|
|
3265
3087
|
* List of commands that should not be instrumented. Takes precedence over
|
|
3266
3088
|
* allowlist if a command matches an entry in both.
|
|
@@ -3269,14 +3091,6 @@ declare namespace tracer {
|
|
|
3269
3091
|
*/
|
|
3270
3092
|
blocklist?: string | RegExp | ((command: string) => boolean) | (string | RegExp | ((command: string) => boolean))[];
|
|
3271
3093
|
|
|
3272
|
-
/**
|
|
3273
|
-
* Deprecated in favor of `blocklist`.
|
|
3274
|
-
*
|
|
3275
|
-
* @deprecated
|
|
3276
|
-
* @hidden
|
|
3277
|
-
*/
|
|
3278
|
-
blacklist?: string | RegExp | ((command: string) => boolean) | (string | RegExp | ((command: string) => boolean))[];
|
|
3279
|
-
|
|
3280
3094
|
/**
|
|
3281
3095
|
* Custom filter function used to decide whether a Redis command should be instrumented.
|
|
3282
3096
|
* When provided, this takes precedence over allowlist/blocklist configuration.
|
|
@@ -3597,16 +3411,6 @@ declare namespace tracer {
|
|
|
3597
3411
|
*/
|
|
3598
3412
|
recordException(exception: Exception, time?: TimeInput): void;
|
|
3599
3413
|
|
|
3600
|
-
/**
|
|
3601
|
-
* Causally links another span to the current span
|
|
3602
|
-
*
|
|
3603
|
-
* @deprecated In favor of addLink(link: otel.Link). This will be removed in the next major version.
|
|
3604
|
-
* @param {otel.SpanContext} context The context of the span to link to.
|
|
3605
|
-
* @param {SpanAttributes} attributes An optional key value pair of arbitrary values.
|
|
3606
|
-
* @returns {void}
|
|
3607
|
-
*/
|
|
3608
|
-
addLink(context: otel.SpanContext, attributes?: SpanAttributes): void;
|
|
3609
|
-
|
|
3610
3414
|
/**
|
|
3611
3415
|
* Adds a single link to the span.
|
|
3612
3416
|
*
|
|
@@ -3767,16 +3571,6 @@ declare namespace tracer {
|
|
|
3767
3571
|
*/
|
|
3768
3572
|
redactionValuePattern?: string,
|
|
3769
3573
|
|
|
3770
|
-
/**
|
|
3771
|
-
* Allows to enable security controls. This option is not supported when
|
|
3772
|
-
* using ESM.
|
|
3773
|
-
* @deprecated Please use the DD_IAST_SECURITY_CONTROLS_CONFIGURATION
|
|
3774
|
-
* environment variable instead. This option will be removed in the next major version.
|
|
3775
|
-
* @env DD_IAST_SECURITY_CONTROLS_CONFIGURATION
|
|
3776
|
-
* Programmatic configuration takes precedence over the environment variables listed above.
|
|
3777
|
-
*/
|
|
3778
|
-
securityControlsConfiguration?: string,
|
|
3779
|
-
|
|
3780
3574
|
/**
|
|
3781
3575
|
* Specifies the verbosity of the sent telemetry. Default 'INFORMATION'
|
|
3782
3576
|
* @env DD_IAST_TELEMETRY_VERBOSITY
|
|
@@ -3895,13 +3689,22 @@ declare namespace tracer {
|
|
|
3895
3689
|
* outputData: { content: 'response', role: 'ai' },
|
|
3896
3690
|
* metadata: { temperature: 0.7 },
|
|
3897
3691
|
* tags: { host: 'localhost' },
|
|
3898
|
-
* metrics: { inputTokens: 10, outputTokens: 20, totalTokens: 30 }
|
|
3692
|
+
* metrics: { inputTokens: 10, outputTokens: 20, totalTokens: 30 },
|
|
3693
|
+
* toolDefinitions: [
|
|
3694
|
+
* {
|
|
3695
|
+
* name: 'get_weather',
|
|
3696
|
+
* description: 'Returns the current weather for a given location.',
|
|
3697
|
+
* schema: { type: 'object', properties: { location: { type: 'string' } }, required: ['location'] },
|
|
3698
|
+
* version: '1.0.0'
|
|
3699
|
+
* },
|
|
3700
|
+
* { name: 'get_time' }
|
|
3701
|
+
* ]
|
|
3899
3702
|
* })
|
|
3900
3703
|
* })
|
|
3901
3704
|
* ```
|
|
3902
3705
|
*
|
|
3903
3706
|
* @param span The span to annotate (defaults to the current LLM Observability span if not provided)
|
|
3904
|
-
* @param options An object containing the inputs, outputs, tags, metadata, and metrics to set on the span.
|
|
3707
|
+
* @param options An object containing the inputs, outputs, tags, metadata, tool definitions, and metrics to set on the span.
|
|
3905
3708
|
*/
|
|
3906
3709
|
annotate (options: llmobs.AnnotationOptions): void
|
|
3907
3710
|
annotate (span: tracer.Span | undefined, options: llmobs.AnnotationOptions): void
|
|
@@ -4001,8 +3804,7 @@ declare namespace tracer {
|
|
|
4001
3804
|
id?: string,
|
|
4002
3805
|
inputData: JSONType,
|
|
4003
3806
|
expectedOutput?: JSONType,
|
|
4004
|
-
metadata?: Record<string, JSONType
|
|
4005
|
-
tags?: string[]
|
|
3807
|
+
metadata?: Record<string, JSONType>
|
|
4006
3808
|
}>
|
|
4007
3809
|
}
|
|
4008
3810
|
|
|
@@ -4035,8 +3837,6 @@ declare namespace tracer {
|
|
|
4035
3837
|
expectedRecordCount?: number
|
|
4036
3838
|
/** Maximum total time to wait, in ms. Default 30000. */
|
|
4037
3839
|
maxWaitMs?: number
|
|
4038
|
-
/** Filter records by these tags. */
|
|
4039
|
-
tags?: string[]
|
|
4040
3840
|
}
|
|
4041
3841
|
|
|
4042
3842
|
interface ExperimentResultRow {
|
|
@@ -4154,12 +3954,7 @@ declare namespace tracer {
|
|
|
4154
3954
|
}
|
|
4155
3955
|
|
|
4156
3956
|
interface Dataset {
|
|
4157
|
-
addRecord (
|
|
4158
|
-
input: JSONType,
|
|
4159
|
-
expectedOutput?: JSONType,
|
|
4160
|
-
metadata?: Record<string, JSONType>,
|
|
4161
|
-
tags?: string[]
|
|
4162
|
-
): Dataset
|
|
3957
|
+
addRecord (input: JSONType, expectedOutput?: JSONType, metadata?: Record<string, JSONType>): Dataset
|
|
4163
3958
|
/** Update fields on an existing dataset record. */
|
|
4164
3959
|
update (index: number, fields: {
|
|
4165
3960
|
input?: JSONType
|
|
@@ -4168,12 +3963,6 @@ declare namespace tracer {
|
|
|
4168
3963
|
}): Dataset
|
|
4169
3964
|
/** Delete an existing dataset record. */
|
|
4170
3965
|
delete (index: number): Dataset
|
|
4171
|
-
/** Add tags to a dataset record. */
|
|
4172
|
-
addTags (index: number, tags: string[]): Dataset
|
|
4173
|
-
/** Remove tags from a dataset record. */
|
|
4174
|
-
removeTags (index: number, tags: string[]): Dataset
|
|
4175
|
-
/** Replace all tags on a dataset record. */
|
|
4176
|
-
replaceTags (index: number, tags: string[]): Dataset
|
|
4177
3966
|
/** Creates the dataset remotely if needed and pushes any unpushed records. */
|
|
4178
3967
|
push (): Promise<DatasetPushResult>
|
|
4179
3968
|
name (): string
|
|
@@ -4186,11 +3975,8 @@ declare namespace tracer {
|
|
|
4186
3975
|
id: string | null,
|
|
4187
3976
|
input: JSONType,
|
|
4188
3977
|
expectedOutput: JSONType,
|
|
4189
|
-
metadata: Record<string, JSONType
|
|
4190
|
-
tags: string[]
|
|
3978
|
+
metadata: Record<string, JSONType>
|
|
4191
3979
|
}>
|
|
4192
|
-
/** Return the tags used to filter this dataset. */
|
|
4193
|
-
filterTags (): string[]
|
|
4194
3980
|
/** Dashboard URL for the dataset, or null until pushed. */
|
|
4195
3981
|
url (): string | null
|
|
4196
3982
|
}
|
|
@@ -4552,7 +4338,6 @@ declare namespace tracer {
|
|
|
4552
4338
|
version? : string
|
|
4553
4339
|
}
|
|
4554
4340
|
|
|
4555
|
-
|
|
4556
4341
|
/**
|
|
4557
4342
|
* Annotation options for LLM Observability spans.
|
|
4558
4343
|
*/
|
|
@@ -4599,7 +4384,6 @@ declare namespace tracer {
|
|
|
4599
4384
|
* A Prompt object that represents the prompt used for an LLM call. Only used on `llm` spans.
|
|
4600
4385
|
*/
|
|
4601
4386
|
prompt?: Prompt,
|
|
4602
|
-
|
|
4603
4387
|
/**
|
|
4604
4388
|
* A list of ToolDefinition object that represents the tools available to the LLM for this span
|
|
4605
4389
|
* Each definition requires a `name` and optionally accepts `description`, `schema`, and `version`.
|
|
@@ -4729,6 +4513,7 @@ declare namespace tracer {
|
|
|
4729
4513
|
*/
|
|
4730
4514
|
sampleRate?: number,
|
|
4731
4515
|
}
|
|
4516
|
+
|
|
4732
4517
|
/** @hidden */
|
|
4733
4518
|
type spanKind = 'agent' | 'workflow' | 'task' | 'tool' | 'retrieval' | 'embedding' | 'llm'
|
|
4734
4519
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dd-trace",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.11.0",
|
|
4
4
|
"description": "Datadog APM tracing client for JavaScript",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"typings": "index.d.ts",
|
|
@@ -57,14 +57,13 @@
|
|
|
57
57
|
"test:core:ci": "node scripts/c8-ci.js test:core",
|
|
58
58
|
"test:code-origin": "mocha \"packages/datadog-code-origin/test/**/*.spec.js\"",
|
|
59
59
|
"test:code-origin:ci": "node scripts/c8-ci.js test:code-origin",
|
|
60
|
-
"test:evp_proxy": "mocha \"packages/dd-trace/test/evp_proxy/**/*.spec.js\"",
|
|
61
60
|
"test:lambda": "mocha \"packages/dd-trace/test/lambda/**/*.spec.js\"",
|
|
62
61
|
"test:lambda:ci": "node scripts/c8-ci.js test:lambda",
|
|
63
62
|
"test:llmobs:sdk": "mocha --exclude \"packages/dd-trace/test/llmobs/plugins/**/*.spec.js\" \"packages/dd-trace/test/llmobs/**/*.spec.js\"",
|
|
64
63
|
"test:llmobs:sdk:ci": "node scripts/c8-ci.js test:llmobs:sdk",
|
|
65
64
|
"test:llmobs:plugins": "mocha \"packages/dd-trace/test/llmobs/plugins/@(${PLUGINS})/*.spec.js\"",
|
|
66
65
|
"test:llmobs:plugins:ci": "yarn services && node scripts/c8-ci.js test:llmobs:plugins",
|
|
67
|
-
"test:openfeature": "mocha \"packages/dd-trace/test/
|
|
66
|
+
"test:openfeature": "mocha \"packages/dd-trace/test/openfeature/**/*.spec.js\"",
|
|
68
67
|
"test:openfeature:ci": "node scripts/c8-ci.js test:openfeature",
|
|
69
68
|
"test:plugins": "node --expose-gc ./node_modules/mocha/bin/mocha.js --fail-zero \"packages/datadog-plugin-@(${PLUGINS})/test/**/${SPEC:-*}*.spec.js\"",
|
|
70
69
|
"test:plugins:ci": "yarn services && node scripts/c8-ci.js test:plugins",
|
|
@@ -142,7 +141,7 @@
|
|
|
142
141
|
},
|
|
143
142
|
"homepage": "https://github.com/DataDog/dd-trace-js#readme",
|
|
144
143
|
"engines": {
|
|
145
|
-
"node": ">=
|
|
144
|
+
"node": ">=22"
|
|
146
145
|
},
|
|
147
146
|
"nodeMaxMajor": 27,
|
|
148
147
|
"files": [
|
|
@@ -187,7 +186,7 @@
|
|
|
187
186
|
"@datadog/native-appsec": "11.0.1",
|
|
188
187
|
"@datadog/native-iast-taint-tracking": "4.2.0",
|
|
189
188
|
"@datadog/native-metrics": "3.1.2",
|
|
190
|
-
"@datadog/pprof": "5.18.
|
|
189
|
+
"@datadog/pprof": "5.18.0",
|
|
191
190
|
"@datadog/wasm-js-rewriter": "5.0.3",
|
|
192
191
|
"@opentelemetry/api": ">=1.0.0 <1.10.0",
|
|
193
192
|
"@opentelemetry/api-logs": "<1.0.0",
|
|
@@ -197,58 +196,58 @@
|
|
|
197
196
|
"@actions/core": "^3.0.1",
|
|
198
197
|
"@actions/github": "^9.1.1",
|
|
199
198
|
"@babel/helpers": "^8.0.0",
|
|
200
|
-
"@eslint/eslintrc": "^3.3.
|
|
199
|
+
"@eslint/eslintrc": "^3.3.5",
|
|
201
200
|
"@eslint/js": "^10.0.1",
|
|
202
201
|
"@eslint/plugin-kit": "^0.7.2",
|
|
203
202
|
"@datadog/openfeature-node-server": "2.1.0",
|
|
204
203
|
"@msgpack/msgpack": "^3.1.3",
|
|
205
|
-
"@openfeature/core": "^1.
|
|
206
|
-
"@openfeature/server-sdk": "~1.
|
|
204
|
+
"@openfeature/core": "^1.11.0",
|
|
205
|
+
"@openfeature/server-sdk": "~1.22.0",
|
|
207
206
|
"@stylistic/eslint-plugin": "^5.10.0",
|
|
208
207
|
"@types/mocha": "^10.0.10",
|
|
209
208
|
"@types/node": "^18.19.106",
|
|
210
209
|
"@types/sinon": "^22.0.0",
|
|
211
210
|
"@vercel/nft": "^1.10.2",
|
|
212
211
|
"@yarnpkg/lockfile": "^1.1.0",
|
|
213
|
-
"axios": "^1.
|
|
212
|
+
"axios": "^1.18.1",
|
|
214
213
|
"benchmark": "^2.1.4",
|
|
215
214
|
"body-parser": "^2.3.0",
|
|
216
215
|
"bun": "1.3.14",
|
|
217
216
|
"c8": "^12.0.0",
|
|
218
217
|
"codeowners-audit": "^2.9.0",
|
|
219
|
-
"eslint": "^10.
|
|
220
|
-
"eslint-plugin-cypress": "^
|
|
218
|
+
"eslint": "^10.5.0",
|
|
219
|
+
"eslint-plugin-cypress": "^6.4.2",
|
|
221
220
|
"eslint-plugin-import-x": "^4.16.2",
|
|
222
|
-
"eslint-plugin-jsdoc": "^
|
|
221
|
+
"eslint-plugin-jsdoc": "^63.0.12",
|
|
223
222
|
"eslint-plugin-mocha": "^11.3.0",
|
|
224
|
-
"eslint-plugin-n": "^18.
|
|
223
|
+
"eslint-plugin-n": "^18.2.1",
|
|
225
224
|
"eslint-plugin-promise": "^7.3.0",
|
|
226
225
|
"eslint-plugin-sonarjs": "^4.2.0",
|
|
227
226
|
"eslint-plugin-unicorn": "^73.0.0",
|
|
228
227
|
"express": "^5.1.0",
|
|
229
228
|
"glob": "^10.4.5",
|
|
230
|
-
"globals": "^17.
|
|
229
|
+
"globals": "^17.7.0",
|
|
231
230
|
"graphql": "*",
|
|
232
231
|
"husky": "^9.1.7",
|
|
233
232
|
"istanbul-lib-report": "^3.0.0",
|
|
234
233
|
"istanbul-reports": "^3.0.2",
|
|
235
234
|
"jsonc-parser": "^3.3.1",
|
|
236
235
|
"jszip": "^3.10.1",
|
|
237
|
-
"minimatch": "^10.2.
|
|
238
|
-
"mocha": "^11.
|
|
236
|
+
"minimatch": "^10.2.5",
|
|
237
|
+
"mocha": "^11.7.6",
|
|
239
238
|
"mocha-junit-reporter": "^2.2.1",
|
|
240
239
|
"mocha-multi-reporters": "^1.5.1",
|
|
241
240
|
"multer": "^2.2.0",
|
|
242
|
-
"nock": "^14.0.
|
|
241
|
+
"nock": "^14.0.16",
|
|
243
242
|
"node-preload": "^0.2.1",
|
|
244
243
|
"nyc": "^18.0.0",
|
|
245
244
|
"octokit": "^5.0.3",
|
|
246
|
-
"p-limit": "^7.
|
|
245
|
+
"p-limit": "^7.2.0",
|
|
247
246
|
"proxyquire": "^2.1.3",
|
|
248
247
|
"retry": "^0.13.1",
|
|
249
248
|
"semifies": "^1.0.0",
|
|
250
249
|
"semver": "^7.8.5",
|
|
251
|
-
"sinon": "^22.
|
|
250
|
+
"sinon": "^22.0.0",
|
|
252
251
|
"source-map-support": "^0.5.21",
|
|
253
252
|
"test-exclude": "^8.0.0",
|
|
254
253
|
"tiktoken": "^1.0.21",
|
|
@@ -1482,14 +1482,14 @@ function getWrappedRunTestCase (runTestCaseFunction, isNewerCucumberVersion = fa
|
|
|
1482
1482
|
|
|
1483
1483
|
this.options.retry = originalRetry
|
|
1484
1484
|
|
|
1485
|
-
if (isNewerCucumberVersion && isTestManagementTestsEnabled && !isAttemptToFix && (isQuarantined || isDisabled)) {
|
|
1486
|
-
return shouldBePassedByTestManagement
|
|
1487
|
-
}
|
|
1488
|
-
|
|
1489
1485
|
if (isNewerCucumberVersion && shouldRunEarlyFlakeDetection() && (isNew || isModified)) {
|
|
1490
1486
|
return shouldBePassedByEFD
|
|
1491
1487
|
}
|
|
1492
1488
|
|
|
1489
|
+
if (isNewerCucumberVersion && isTestManagementTestsEnabled && !isAttemptToFix && (isQuarantined || isDisabled)) {
|
|
1490
|
+
return shouldBePassedByTestManagement
|
|
1491
|
+
}
|
|
1492
|
+
|
|
1493
1493
|
if (isNewerCucumberVersion && isAttemptToFix && shouldBeFailedByAttemptToFix) {
|
|
1494
1494
|
return false
|
|
1495
1495
|
}
|