dd-trace 5.82.0 → 5.84.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 +77 -79
- package/ci/init.js +6 -6
- package/index.d.ts +213 -4
- package/loader-hook.mjs +1 -1
- package/package.json +59 -56
- package/packages/datadog-core/src/storage.js +7 -7
- package/packages/datadog-esbuild/index.js +6 -0
- package/packages/datadog-instrumentations/src/ai.js +7 -3
- package/packages/datadog-instrumentations/src/child_process.js +1 -1
- package/packages/datadog-instrumentations/src/cucumber.js +1 -1
- package/packages/datadog-instrumentations/src/graphql.js +1 -1
- package/packages/datadog-instrumentations/src/helpers/instrumentations.js +4 -3
- package/packages/datadog-instrumentations/src/helpers/register.js +3 -7
- package/packages/datadog-instrumentations/src/helpers/rewriter/compiler.js +6 -0
- package/packages/datadog-instrumentations/src/helpers/rewriter/index.js +2 -1
- package/packages/datadog-instrumentations/src/helpers/rewriter/transforms.js +73 -16
- package/packages/datadog-instrumentations/src/http/client.js +2 -2
- package/packages/datadog-instrumentations/src/jest.js +124 -64
- package/packages/datadog-instrumentations/src/koa.js +2 -1
- package/packages/datadog-instrumentations/src/light-my-request.js +2 -2
- package/packages/datadog-instrumentations/src/mocha/main.js +2 -2
- package/packages/datadog-instrumentations/src/mocha/worker.js +1 -1
- package/packages/datadog-instrumentations/src/mocha.js +1 -1
- package/packages/datadog-instrumentations/src/mysql.js +1 -1
- package/packages/datadog-instrumentations/src/mysql2.js +2 -2
- package/packages/datadog-instrumentations/src/net.js +13 -5
- package/packages/datadog-instrumentations/src/nyc.js +1 -1
- package/packages/datadog-instrumentations/src/otel-sdk-trace.js +4 -4
- package/packages/datadog-instrumentations/src/pg.js +4 -2
- package/packages/datadog-instrumentations/src/playwright.js +15 -11
- package/packages/datadog-instrumentations/src/selenium.js +2 -2
- package/packages/datadog-instrumentations/src/undici.js +12 -1
- package/packages/datadog-plugin-aws-sdk/src/base.js +4 -4
- package/packages/datadog-plugin-azure-event-hubs/src/producer.js +2 -2
- package/packages/datadog-plugin-azure-service-bus/src/producer.js +2 -2
- package/packages/datadog-plugin-cucumber/src/index.js +35 -34
- package/packages/datadog-plugin-cypress/src/cypress-plugin.js +2 -2
- package/packages/datadog-plugin-dd-trace-api/src/index.js +2 -2
- package/packages/datadog-plugin-express/src/code_origin.js +21 -15
- package/packages/datadog-plugin-fastify/src/code_origin.js +17 -4
- package/packages/datadog-plugin-jest/src/index.js +2 -2
- package/packages/datadog-plugin-mocha/src/index.js +2 -2
- package/packages/datadog-plugin-mongodb-core/src/index.js +2 -2
- package/packages/datadog-plugin-playwright/src/index.js +26 -26
- package/packages/datadog-plugin-undici/src/index.js +305 -2
- package/packages/datadog-plugin-vitest/src/index.js +5 -5
- package/packages/datadog-shimmer/src/shimmer.js +2 -5
- package/packages/dd-trace/index.js +19 -0
- package/packages/dd-trace/src/agent/info.js +57 -0
- package/packages/dd-trace/src/agent/url.js +28 -0
- package/packages/dd-trace/src/appsec/iast/taint-tracking/rewriter.js +1 -1
- package/packages/dd-trace/src/appsec/index.js +47 -7
- package/packages/dd-trace/src/appsec/rasp/index.js +2 -4
- package/packages/dd-trace/src/azure_metadata.js +8 -3
- package/packages/dd-trace/src/baggage.js +36 -11
- package/packages/dd-trace/src/ci-visibility/dynamic-instrumentation/index.js +5 -1
- package/packages/dd-trace/src/ci-visibility/early-flake-detection/get-known-tests.js +2 -2
- package/packages/dd-trace/src/ci-visibility/exporters/agent-proxy/index.js +3 -4
- package/packages/dd-trace/src/ci-visibility/exporters/agentless/coverage-writer.js +2 -2
- package/packages/dd-trace/src/ci-visibility/exporters/agentless/di-logs-writer.js +5 -5
- package/packages/dd-trace/src/ci-visibility/exporters/agentless/writer.js +2 -2
- package/packages/dd-trace/src/ci-visibility/exporters/ci-visibility-exporter.js +5 -11
- package/packages/dd-trace/src/ci-visibility/exporters/git/git_metadata.js +3 -3
- package/packages/dd-trace/src/ci-visibility/exporters/test-worker/index.js +4 -4
- package/packages/dd-trace/src/ci-visibility/exporters/test-worker/writer.js +1 -1
- package/packages/dd-trace/src/ci-visibility/intelligent-test-runner/get-skippable-suites.js +2 -2
- package/packages/dd-trace/src/ci-visibility/log-submission/log-submission-plugin.js +4 -4
- package/packages/dd-trace/src/ci-visibility/requests/get-library-configuration.js +4 -4
- package/packages/dd-trace/src/ci-visibility/telemetry.js +6 -2
- package/packages/dd-trace/src/ci-visibility/test-management/get-test-management-tests.js +2 -2
- package/packages/dd-trace/src/{config_defaults.js → config/defaults.js} +3 -3
- package/packages/dd-trace/src/{config-helper.js → config/helper.js} +88 -15
- package/packages/dd-trace/src/{config.js → config/index.js} +107 -46
- package/packages/dd-trace/src/config/remote_config.js +188 -19
- package/packages/dd-trace/src/{config_stable.js → config/stable.js} +20 -32
- package/packages/dd-trace/src/{supported-configurations.json → config/supported-configurations.json} +3 -1
- package/packages/dd-trace/src/crashtracking/crashtracker.js +2 -5
- package/packages/dd-trace/src/datastreams/processor.js +1 -1
- package/packages/dd-trace/src/datastreams/writer.js +2 -8
- package/packages/dd-trace/src/debugger/devtools_client/condition.js +1 -1
- package/packages/dd-trace/src/debugger/devtools_client/config.js +2 -7
- package/packages/dd-trace/src/debugger/devtools_client/json-buffer.js +10 -11
- package/packages/dd-trace/src/debugger/devtools_client/send.js +3 -3
- package/packages/dd-trace/src/debugger/devtools_client/snapshot/constants.js +1 -1
- package/packages/dd-trace/src/debugger/index.js +83 -15
- package/packages/dd-trace/src/dogstatsd.js +5 -11
- package/packages/dd-trace/src/encode/0.4.js +2 -2
- package/packages/dd-trace/src/exporter.js +1 -1
- package/packages/dd-trace/src/exporters/agent/index.js +5 -11
- package/packages/dd-trace/src/exporters/agent/writer.js +12 -16
- package/packages/dd-trace/src/exporters/common/{agent-info-exporter.js → buffering-exporter.js} +10 -37
- package/packages/dd-trace/src/exporters/common/docker.js +2 -2
- package/packages/dd-trace/src/exporters/common/request.js +1 -1
- package/packages/dd-trace/src/exporters/common/util.js +2 -2
- package/packages/dd-trace/src/exporters/span-stats/index.js +3 -10
- package/packages/dd-trace/src/flare/index.js +1 -1
- package/packages/dd-trace/src/guardrails/telemetry.js +1 -1
- package/packages/dd-trace/src/index.js +4 -4
- package/packages/dd-trace/src/lambda/handler.js +2 -2
- package/packages/dd-trace/src/lambda/index.js +2 -2
- package/packages/dd-trace/src/lambda/runtime/patch.js +2 -2
- package/packages/dd-trace/src/lambda/runtime/ritm.js +2 -2
- package/packages/dd-trace/src/llmobs/constants/tags.js +8 -1
- package/packages/dd-trace/src/llmobs/index.js +2 -2
- package/packages/dd-trace/src/llmobs/noop.js +2 -0
- package/packages/dd-trace/src/llmobs/plugins/openai/index.js +3 -4
- package/packages/dd-trace/src/llmobs/sdk.js +33 -6
- package/packages/dd-trace/src/llmobs/span_processor.js +17 -7
- package/packages/dd-trace/src/llmobs/tagger.js +175 -1
- package/packages/dd-trace/src/llmobs/writers/base.js +118 -45
- package/packages/dd-trace/src/llmobs/writers/spans.js +4 -3
- package/packages/dd-trace/src/llmobs/writers/util.js +3 -9
- package/packages/dd-trace/src/log/index.js +50 -35
- package/packages/dd-trace/src/log/writer.js +13 -78
- package/packages/dd-trace/src/noop/proxy.js +3 -3
- package/packages/dd-trace/src/openfeature/writers/base.js +9 -16
- package/packages/dd-trace/src/openfeature/writers/util.js +3 -8
- package/packages/dd-trace/src/opentelemetry/otlp/otlp_http_exporter_base.js +2 -2
- package/packages/dd-trace/src/opentelemetry/tracer.js +48 -6
- package/packages/dd-trace/src/opentracing/propagation/text_map.js +45 -21
- package/packages/dd-trace/src/opentracing/span.js +4 -4
- package/packages/dd-trace/src/plugin_manager.js +8 -6
- package/packages/dd-trace/src/plugins/util/ci.js +5 -8
- package/packages/dd-trace/src/plugins/util/git-cache.js +3 -3
- package/packages/dd-trace/src/plugins/util/test.js +1 -1
- package/packages/dd-trace/src/plugins/util/user-provided-git.js +41 -43
- package/packages/dd-trace/src/profiler.js +4 -39
- package/packages/dd-trace/src/profiling/config.js +74 -34
- package/packages/dd-trace/src/profiling/exporter_cli.js +5 -5
- package/packages/dd-trace/src/profiling/exporters/agent.js +1 -1
- package/packages/dd-trace/src/profiling/exporters/event_serializer.js +9 -2
- package/packages/dd-trace/src/profiling/index.js +1 -1
- package/packages/dd-trace/src/profiling/libuv-size.js +1 -1
- package/packages/dd-trace/src/profiling/profiler.js +57 -2
- package/packages/dd-trace/src/proxy.js +34 -5
- package/packages/dd-trace/src/remote_config/capabilities.js +4 -0
- package/packages/dd-trace/src/remote_config/index.js +2 -7
- package/packages/dd-trace/src/ritm.js +8 -4
- package/packages/dd-trace/src/runtime_metrics/runtime_metrics.js +2 -2
- package/packages/dd-trace/src/serverless.js +2 -2
- package/packages/dd-trace/src/span_processor.js +2 -2
- package/packages/dd-trace/src/startup-log.js +7 -16
- package/packages/dd-trace/src/telemetry/endpoints.js +67 -5
- package/packages/dd-trace/src/telemetry/send-data.js +103 -4
- package/packages/dd-trace/src/telemetry/telemetry.js +229 -110
- package/vendor/dist/@isaacs/ttlcache/index.js +1 -1
- package/vendor/dist/esquery/index.js +1 -1
- package/vendor/dist/meriyah/index.js +1 -1
- package/vendor/dist/protobufjs/index.js +1 -1
- /package/packages/dd-trace/src/{git_properties.js → config/git_properties.js} +0 -0
package/LICENSE-3rdparty.csv
CHANGED
|
@@ -1,79 +1,77 @@
|
|
|
1
|
-
"component","origin","license","copyright"
|
|
2
|
-
"@datadog/flagging-core","https://github.com/DataDog/openfeature-js-client","['Apache-2.0']","['DataDog']"
|
|
3
|
-
"@datadog/libdatadog","https://github.com/DataDog/libdatadog-nodejs","['Apache-2.0']","['Datadog Inc.']"
|
|
4
|
-
"@datadog/native-appsec","https://github.com/DataDog/dd-native-appsec-js","['Apache-2.0']","['Datadog Inc.']"
|
|
5
|
-
"@datadog/native-iast-taint-tracking","https://github.com/DataDog/dd-native-iast-taint-tracking-js","['Apache-2.0']","['Datadog Inc.']"
|
|
6
|
-
"@datadog/native-metrics","https://github.com/DataDog/dd-native-metrics-js","['Apache-2.0']","['Datadog Inc.']"
|
|
7
|
-
"@datadog/openfeature-node-server","https://github.com/DataDog/openfeature-js-client","['Apache-2.0']","['DataDog']"
|
|
8
|
-
"@datadog/pprof","https://github.com/DataDog/pprof-nodejs","['Apache-2.0']","['Google Inc.']"
|
|
9
|
-
"@datadog/sketches-js","https://github.com/DataDog/sketches-js","['Apache-2.0']","['DataDog']"
|
|
10
|
-
"@datadog/
|
|
11
|
-
"@
|
|
12
|
-
"@
|
|
13
|
-
"@jsep-plugin/
|
|
14
|
-
"@
|
|
15
|
-
"@
|
|
16
|
-
"@opentelemetry/
|
|
17
|
-
"@opentelemetry/
|
|
18
|
-
"@opentelemetry/
|
|
19
|
-
"@
|
|
20
|
-
"@
|
|
21
|
-
"@protobufjs/
|
|
22
|
-
"@protobufjs/
|
|
23
|
-
"@protobufjs/
|
|
24
|
-
"@protobufjs/
|
|
25
|
-
"@protobufjs/
|
|
26
|
-
"@protobufjs/
|
|
27
|
-
"@protobufjs/
|
|
28
|
-
"@protobufjs/
|
|
29
|
-
"@
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"aws-lambda-nodejs-runtime-interface-client","https://github.com/aws/aws-lambda-nodejs-runtime-interface-client/blob/v2.1.0/src/utils/UserFunction.ts","['Apache-2.0']","['Amazon.com Inc. or its affiliates']"
|
|
79
|
-
"is-git-url","https://github.com/jonschlinkert/is-git-url/blob/396965ffabf2f46656c8af4c47bef1d69f09292e/index.js#L9C15-L9C87","['MIT']","['Jon Schlinkert']"
|
|
1
|
+
"component","origin","license","copyright"
|
|
2
|
+
"@datadog/flagging-core","https://github.com/DataDog/openfeature-js-client","['Apache-2.0']","['DataDog']"
|
|
3
|
+
"@datadog/libdatadog","https://github.com/DataDog/libdatadog-nodejs","['Apache-2.0']","['Datadog Inc.']"
|
|
4
|
+
"@datadog/native-appsec","https://github.com/DataDog/dd-native-appsec-js","['Apache-2.0']","['Datadog Inc.']"
|
|
5
|
+
"@datadog/native-iast-taint-tracking","https://github.com/DataDog/dd-native-iast-taint-tracking-js","['Apache-2.0']","['Datadog Inc.']"
|
|
6
|
+
"@datadog/native-metrics","https://github.com/DataDog/dd-native-metrics-js","['Apache-2.0']","['Datadog Inc.']"
|
|
7
|
+
"@datadog/openfeature-node-server","https://github.com/DataDog/openfeature-js-client","['Apache-2.0']","['DataDog']"
|
|
8
|
+
"@datadog/pprof","https://github.com/DataDog/pprof-nodejs","['Apache-2.0']","['Google Inc.']"
|
|
9
|
+
"@datadog/sketches-js","https://github.com/DataDog/sketches-js","['Apache-2.0']","['DataDog']"
|
|
10
|
+
"@datadog/wasm-js-rewriter","https://github.com/DataDog/dd-wasm-js-rewriter","['Apache-2.0']","['Datadog Inc.']"
|
|
11
|
+
"@isaacs/ttlcache","https://github.com/isaacs/ttlcache","['BlueOak-1.0.0']","['Isaac Z. Schlueter']"
|
|
12
|
+
"@jsep-plugin/assignment","https://github.com/EricSmekens/jsep","['MIT']","['Shelly']"
|
|
13
|
+
"@jsep-plugin/regex","https://github.com/EricSmekens/jsep","['MIT']","['Shelly']"
|
|
14
|
+
"@opentelemetry/api","https://github.com/open-telemetry/opentelemetry-js","['Apache-2.0']","['OpenTelemetry Authors']"
|
|
15
|
+
"@opentelemetry/api-logs","https://github.com/open-telemetry/opentelemetry-js","['Apache-2.0']","['OpenTelemetry Authors']"
|
|
16
|
+
"@opentelemetry/core","https://github.com/open-telemetry/opentelemetry-js","['Apache-2.0']","['OpenTelemetry Authors']"
|
|
17
|
+
"@opentelemetry/resources","https://github.com/open-telemetry/opentelemetry-js","['Apache-2.0']","['OpenTelemetry Authors']"
|
|
18
|
+
"@opentelemetry/semantic-conventions","https://github.com/open-telemetry/opentelemetry-js","['Apache-2.0']","['OpenTelemetry Authors']"
|
|
19
|
+
"@protobufjs/aspromise","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
|
|
20
|
+
"@protobufjs/base64","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
|
|
21
|
+
"@protobufjs/codegen","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
|
|
22
|
+
"@protobufjs/eventemitter","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
|
|
23
|
+
"@protobufjs/fetch","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
|
|
24
|
+
"@protobufjs/float","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
|
|
25
|
+
"@protobufjs/inquire","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
|
|
26
|
+
"@protobufjs/path","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
|
|
27
|
+
"@protobufjs/pool","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
|
|
28
|
+
"@protobufjs/utf8","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
|
|
29
|
+
"@types/node","https://github.com/DefinitelyTyped/DefinitelyTyped","['MIT']","['DefinitelyTyped']"
|
|
30
|
+
"acorn","https://github.com/acornjs/acorn","['MIT']","['acornjs']"
|
|
31
|
+
"acorn-import-attributes","https://github.com/xtuc/acorn-import-attributes","['MIT']","['Sven Sauleau']"
|
|
32
|
+
"argparse","https://github.com/nodeca/argparse","['Python-2.0']","['nodeca']"
|
|
33
|
+
"astring","https://github.com/davidbonnet/astring","['MIT']","['David Bonnet']"
|
|
34
|
+
"cjs-module-lexer","https://github.com/nodejs/cjs-module-lexer","['MIT']","['Guy Bedford']"
|
|
35
|
+
"crypto-randomuuid","npm:crypto-randomuuid","['MIT']","['Stephen Belanger']"
|
|
36
|
+
"dc-polyfill","https://github.com/DataDog/dc-polyfill","['MIT']","['Thomas Hunter II']"
|
|
37
|
+
"dd-trace","https://github.com/DataDog/dd-trace-js","['(Apache-2.0 OR BSD-3-Clause)']","['Datadog Inc. <info@datadoghq.com>']"
|
|
38
|
+
"delay","https://github.com/sindresorhus/delay","['MIT']","['Sindre Sorhus']"
|
|
39
|
+
"detect-newline","https://github.com/sindresorhus/detect-newline","['MIT']","['Sindre Sorhus']"
|
|
40
|
+
"escape-string-regexp","https://github.com/sindresorhus/escape-string-regexp","['MIT']","['Sindre Sorhus']"
|
|
41
|
+
"esquery","https://github.com/estools/esquery","['BSD-3-Clause']","['Joel Feenstra']"
|
|
42
|
+
"estraverse","https://github.com/estools/estraverse","['BSD-2-Clause']","['estools']"
|
|
43
|
+
"fast-fifo","https://github.com/mafintosh/fast-fifo","['MIT']","['Mathias Buus']"
|
|
44
|
+
"ignore","https://github.com/kaelzhang/node-ignore","['MIT']","['kael']"
|
|
45
|
+
"import-in-the-middle","https://github.com/nodejs/import-in-the-middle","['Apache-2.0']","['Bryan English']"
|
|
46
|
+
"istanbul-lib-coverage","https://github.com/istanbuljs/istanbuljs","['BSD-3-Clause']","['Krishnan Anantheswaran']"
|
|
47
|
+
"jest-docblock","https://github.com/jestjs/jest","['MIT']","['jestjs']"
|
|
48
|
+
"js-yaml","https://github.com/nodeca/js-yaml","['MIT']","['Vladimir Zapparov']"
|
|
49
|
+
"jsep","https://github.com/EricSmekens/jsep","['MIT']","['Stephen Oney']"
|
|
50
|
+
"jsonpath-plus","https://github.com/JSONPath-Plus/JSONPath","['MIT']","['Stefan Goessner']"
|
|
51
|
+
"limiter","https://github.com/jhurliman/node-rate-limiter","['MIT']","['John Hurliman']"
|
|
52
|
+
"lodash.sortby","https://github.com/lodash/lodash","['MIT']","['John-David Dalton']"
|
|
53
|
+
"long","https://github.com/dcodeIO/long.js","['Apache-2.0']","['Daniel Wirtz']"
|
|
54
|
+
"lru-cache","https://github.com/isaacs/node-lru-cache","['ISC']","['Isaac Z. Schlueter']"
|
|
55
|
+
"meriyah","https://github.com/meriyah/meriyah","['ISC']","['Kenny F.']"
|
|
56
|
+
"module-details-from-path","https://github.com/watson/module-details-from-path","['MIT']","['Thomas Watson']"
|
|
57
|
+
"mutexify","https://github.com/mafintosh/mutexify","['MIT']","['Mathias Buus']"
|
|
58
|
+
"node-addon-api","https://github.com/nodejs/node-addon-api","['MIT']","['nodejs']"
|
|
59
|
+
"node-gyp-build","https://github.com/prebuild/node-gyp-build","['MIT']","['Mathias Buus']"
|
|
60
|
+
"opentracing","https://github.com/opentracing/opentracing-javascript","['Apache-2.0']","['opentracing']"
|
|
61
|
+
"p-limit","https://github.com/sindresorhus/p-limit","['MIT']","['Sindre Sorhus']"
|
|
62
|
+
"path-to-regexp","https://github.com/pillarjs/path-to-regexp","['MIT']","['pillarjs']"
|
|
63
|
+
"pprof-format","https://github.com/DataDog/pprof-format","['MIT']","['Datadog Inc.']"
|
|
64
|
+
"protobufjs","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
|
|
65
|
+
"queue-tick","https://github.com/mafintosh/queue-tick","['MIT']","['Mathias Buus']"
|
|
66
|
+
"retry","https://github.com/tim-kos/node-retry","['MIT']","['Tim Koschützki']"
|
|
67
|
+
"rfdc","https://github.com/davidmarkclements/rfdc","['MIT']","['David Mark Clements']"
|
|
68
|
+
"semifies","https://github.com/holepunchto/semifies","['Apache-2.0']","['Holepunch Inc']"
|
|
69
|
+
"shell-quote","https://github.com/ljharb/shell-quote","['MIT']","['James Halliday']"
|
|
70
|
+
"source-map","https://github.com/mozilla/source-map","['BSD-3-Clause']","['Nick Fitzgerald']"
|
|
71
|
+
"spark-md5","https://github.com/satazor/js-spark-md5","['(WTFPL OR MIT)']","['André Cruz']"
|
|
72
|
+
"tlhunter-sorted-set","https://github.com/tlhunter/node-sorted-set","['MIT']","['Thomas Hunter II']"
|
|
73
|
+
"ttl-set","https://github.com/watson/ttl-set","['MIT']","['Thomas Watson']"
|
|
74
|
+
"undici-types","https://github.com/nodejs/undici","['MIT']","['nodejs']"
|
|
75
|
+
"yocto-queue","https://github.com/sindresorhus/yocto-queue","['MIT']","['Sindre Sorhus']"
|
|
76
|
+
"aws-lambda-nodejs-runtime-interface-client","https://github.com/aws/aws-lambda-nodejs-runtime-interface-client/blob/v2.1.0/src/utils/UserFunction.ts","['Apache-2.0']","['Amazon.com Inc. or its affiliates']"
|
|
77
|
+
"is-git-url","https://github.com/jonschlinkert/is-git-url/blob/396965ffabf2f46656c8af4c47bef1d69f09292e/index.js#L9C15-L9C87","['MIT']","['Jon Schlinkert']"
|
package/ci/init.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
const tracer = require('../packages/dd-trace')
|
|
5
5
|
const { isTrue, isFalse } = require('../packages/dd-trace/src/util')
|
|
6
6
|
const log = require('../packages/dd-trace/src/log')
|
|
7
|
-
const { getEnvironmentVariable } = require('../packages/dd-trace/src/config
|
|
7
|
+
const { getEnvironmentVariable, getValueFromEnvSources } = require('../packages/dd-trace/src/config/helper')
|
|
8
8
|
|
|
9
9
|
const PACKAGE_MANAGERS = ['npm', 'yarn', 'pnpm']
|
|
10
10
|
const DEFAULT_FLUSH_INTERVAL = 5000
|
|
@@ -27,9 +27,9 @@ function detectTestWorkerType () {
|
|
|
27
27
|
if (getEnvironmentVariable('JEST_WORKER_ID')) return 'jest'
|
|
28
28
|
if (getEnvironmentVariable('CUCUMBER_WORKER_ID')) return 'cucumber'
|
|
29
29
|
if (getEnvironmentVariable('MOCHA_WORKER_ID')) return 'mocha'
|
|
30
|
-
if (
|
|
30
|
+
if (getValueFromEnvSources('DD_PLAYWRIGHT_WORKER')) return 'playwright'
|
|
31
31
|
if (getEnvironmentVariable('TINYPOOL_WORKER_ID')) return 'vitest'
|
|
32
|
-
if (
|
|
32
|
+
if (getValueFromEnvSources('DD_VITEST_WORKER')) return 'vitest'
|
|
33
33
|
return null
|
|
34
34
|
}
|
|
35
35
|
|
|
@@ -43,8 +43,8 @@ const baseOptions = {
|
|
|
43
43
|
flushInterval: isJestWorker ? JEST_FLUSH_INTERVAL : DEFAULT_FLUSH_INTERVAL
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
let shouldInit = !isFalse(
|
|
47
|
-
const isAgentlessEnabled = isTrue(
|
|
46
|
+
let shouldInit = !isFalse(getValueFromEnvSources('DD_CIVISIBILITY_ENABLED'))
|
|
47
|
+
const isAgentlessEnabled = isTrue(getValueFromEnvSources('DD_CIVISIBILITY_AGENTLESS_ENABLED'))
|
|
48
48
|
|
|
49
49
|
if (!isTestWorker && isPackageManager()) {
|
|
50
50
|
log.debug('dd-trace is not initialized in a package manager.')
|
|
@@ -58,7 +58,7 @@ if (isTestWorker) {
|
|
|
58
58
|
}
|
|
59
59
|
} else {
|
|
60
60
|
if (isAgentlessEnabled) {
|
|
61
|
-
if (
|
|
61
|
+
if (getValueFromEnvSources('DD_API_KEY')) {
|
|
62
62
|
baseOptions.experimental = {
|
|
63
63
|
exporter: 'datadog'
|
|
64
64
|
}
|
package/index.d.ts
CHANGED
|
@@ -148,7 +148,7 @@ interface Tracer extends opentracing.Tracer {
|
|
|
148
148
|
* OpenFeature Provider with Remote Config integration.
|
|
149
149
|
*
|
|
150
150
|
* Extends DatadogNodeServerProvider with Remote Config integration for dynamic flag configuration.
|
|
151
|
-
* Enable with
|
|
151
|
+
* Enable with DD_EXPERIMENTAL_FLAGGING_PROVIDER_ENABLED=true.
|
|
152
152
|
*
|
|
153
153
|
* @beta This feature is in preview and not ready for production use
|
|
154
154
|
*/
|
|
@@ -161,18 +161,54 @@ interface Tracer extends opentracing.Tracer {
|
|
|
161
161
|
|
|
162
162
|
/**
|
|
163
163
|
* @experimental
|
|
164
|
+
*
|
|
165
|
+
* Set a baggage item and return the new context.
|
|
166
|
+
*
|
|
167
|
+
* @see https://opentelemetry.io/docs/specs/otel/baggage/api/#set-value
|
|
168
|
+
*
|
|
169
|
+
* ----
|
|
170
|
+
*
|
|
164
171
|
* Provide same functionality as OpenTelemetry Baggage:
|
|
165
172
|
* https://opentelemetry.io/docs/concepts/signals/baggage/
|
|
166
173
|
*
|
|
167
174
|
* Since the equivalent of OTel Context is implicit in dd-trace-js,
|
|
168
175
|
* these APIs act on the currently active baggage
|
|
169
176
|
*
|
|
170
|
-
* Work with storage('baggage'), therefore do not follow the same continuity as other APIs
|
|
177
|
+
* Work with storage('baggage'), therefore do not follow the same continuity as other APIs.
|
|
178
|
+
*/
|
|
179
|
+
setBaggageItem (key: string, value: string, metadata?: object): Record<string, string>;
|
|
180
|
+
/**
|
|
181
|
+
* @experimental
|
|
182
|
+
*
|
|
183
|
+
* Returns a specific baggage item from the current context.
|
|
184
|
+
*
|
|
185
|
+
* @see https://opentelemetry.io/docs/specs/otel/baggage/api/#get-value
|
|
171
186
|
*/
|
|
172
|
-
setBaggageItem (key: string, value: string): Record<string, string>;
|
|
173
187
|
getBaggageItem (key: string): string | undefined;
|
|
188
|
+
/**
|
|
189
|
+
* @experimental
|
|
190
|
+
*
|
|
191
|
+
* Returns all baggage items from the current context.
|
|
192
|
+
*
|
|
193
|
+
* @see https://opentelemetry.io/docs/specs/otel/baggage/api/#get-all-values
|
|
194
|
+
*/
|
|
174
195
|
getAllBaggageItems (): Record<string, string>;
|
|
196
|
+
/**
|
|
197
|
+
* @experimental
|
|
198
|
+
*
|
|
199
|
+
* Removes a specific baggage item from the current context and returns the new context.
|
|
200
|
+
*
|
|
201
|
+
* @see https://opentelemetry.io/docs/specs/otel/baggage/api/#remove-value
|
|
202
|
+
*/
|
|
175
203
|
removeBaggageItem (key: string): Record<string, string>;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* @experimental
|
|
207
|
+
*
|
|
208
|
+
* Removes all baggage items from the current context and returns the new context.
|
|
209
|
+
*
|
|
210
|
+
* @see https://opentelemetry.io/docs/specs/otel/baggage/api/#remove-all-values
|
|
211
|
+
*/
|
|
176
212
|
removeAllBaggageItems (): Record<string, string>;
|
|
177
213
|
}
|
|
178
214
|
|
|
@@ -205,6 +241,8 @@ interface Plugins {
|
|
|
205
241
|
"express": tracer.plugins.express;
|
|
206
242
|
"fastify": tracer.plugins.fastify;
|
|
207
243
|
"fetch": tracer.plugins.fetch;
|
|
244
|
+
"find-my-way": tracer.plugins.find_my_way;
|
|
245
|
+
"fs": tracer.plugins.fs;
|
|
208
246
|
"generic-pool": tracer.plugins.generic_pool;
|
|
209
247
|
"google-cloud-pubsub": tracer.plugins.google_cloud_pubsub;
|
|
210
248
|
"google-cloud-vertexai": tracer.plugins.google_cloud_vertexai;
|
|
@@ -233,6 +271,7 @@ interface Plugins {
|
|
|
233
271
|
"mysql2": tracer.plugins.mysql2;
|
|
234
272
|
"net": tracer.plugins.net;
|
|
235
273
|
"next": tracer.plugins.next;
|
|
274
|
+
"nyc": tracer.plugins.nyc;
|
|
236
275
|
"openai": tracer.plugins.openai;
|
|
237
276
|
"opensearch": tracer.plugins.opensearch;
|
|
238
277
|
"oracledb": tracer.plugins.oracledb;
|
|
@@ -250,7 +289,9 @@ interface Plugins {
|
|
|
250
289
|
"tedious": tracer.plugins.tedious;
|
|
251
290
|
"undici": tracer.plugins.undici;
|
|
252
291
|
"vitest": tracer.plugins.vitest;
|
|
292
|
+
"web": tracer.plugins.web;
|
|
253
293
|
"winston": tracer.plugins.winston;
|
|
294
|
+
"ws": tracer.plugins.ws;
|
|
254
295
|
}
|
|
255
296
|
|
|
256
297
|
declare namespace tracer {
|
|
@@ -651,6 +692,7 @@ declare namespace tracer {
|
|
|
651
692
|
/**
|
|
652
693
|
* Whether to enable the feature flagging provider.
|
|
653
694
|
* Requires Remote Config to be properly configured.
|
|
695
|
+
* Can be configured via DD_EXPERIMENTAL_FLAGGING_PROVIDER_ENABLED environment variable.
|
|
654
696
|
*
|
|
655
697
|
* @default false
|
|
656
698
|
*/
|
|
@@ -658,6 +700,7 @@ declare namespace tracer {
|
|
|
658
700
|
/**
|
|
659
701
|
* Timeout in milliseconds for OpenFeature provider initialization.
|
|
660
702
|
* If configuration is not received within this time, initialization fails.
|
|
703
|
+
* Can be configured via DD_EXPERIMENTAL_FLAGGING_PROVIDER_INITIALIZATION_TIMEOUT_MS environment variable.
|
|
661
704
|
*
|
|
662
705
|
* @default 30000
|
|
663
706
|
*/
|
|
@@ -932,6 +975,46 @@ declare namespace tracer {
|
|
|
932
975
|
* Configuration enabling LLM Observability. Enablement is superseded by the DD_LLMOBS_ENABLED environment variable.
|
|
933
976
|
*/
|
|
934
977
|
llmobs?: llmobs.LLMObsEnableOptions
|
|
978
|
+
|
|
979
|
+
/**
|
|
980
|
+
* Configuration for Dynamic Instrumentation (Live Debugging).
|
|
981
|
+
*/
|
|
982
|
+
dynamicInstrumentation?: {
|
|
983
|
+
/**
|
|
984
|
+
* Whether to enable Dynamic Instrumentation.
|
|
985
|
+
* @default false
|
|
986
|
+
*/
|
|
987
|
+
enabled?: boolean
|
|
988
|
+
|
|
989
|
+
/**
|
|
990
|
+
* Path to a custom probes configuration file.
|
|
991
|
+
*/
|
|
992
|
+
probeFile?: string
|
|
993
|
+
|
|
994
|
+
/**
|
|
995
|
+
* Timeout in milliseconds for capturing variable values.
|
|
996
|
+
* @default 100
|
|
997
|
+
*/
|
|
998
|
+
captureTimeoutMs?: number
|
|
999
|
+
|
|
1000
|
+
/**
|
|
1001
|
+
* Interval in seconds between uploads of probe data.
|
|
1002
|
+
* @default 1
|
|
1003
|
+
*/
|
|
1004
|
+
uploadIntervalSeconds?: number
|
|
1005
|
+
|
|
1006
|
+
/**
|
|
1007
|
+
* List of identifier names to redact in captured data.
|
|
1008
|
+
* @default []
|
|
1009
|
+
*/
|
|
1010
|
+
redactedIdentifiers?: string[]
|
|
1011
|
+
|
|
1012
|
+
/**
|
|
1013
|
+
* List of identifier names to exclude from redaction.
|
|
1014
|
+
* @default []
|
|
1015
|
+
*/
|
|
1016
|
+
redactionExcludedIdentifiers?: string[]
|
|
1017
|
+
}
|
|
935
1018
|
}
|
|
936
1019
|
|
|
937
1020
|
/**
|
|
@@ -1848,6 +1931,16 @@ declare namespace tracer {
|
|
|
1848
1931
|
*/
|
|
1849
1932
|
interface fetch extends HttpClient {}
|
|
1850
1933
|
|
|
1934
|
+
/**
|
|
1935
|
+
* This plugin patches the [find-my-way](https://github.com/delvedor/find-my-way) router.
|
|
1936
|
+
*/
|
|
1937
|
+
interface find_my_way extends Integration {}
|
|
1938
|
+
|
|
1939
|
+
/**
|
|
1940
|
+
* This plugin automatically instruments Node.js core fs operations.
|
|
1941
|
+
*/
|
|
1942
|
+
interface fs extends Instrumentation {}
|
|
1943
|
+
|
|
1851
1944
|
/**
|
|
1852
1945
|
* This plugin patches the [generic-pool](https://github.com/coopernurse/node-pool)
|
|
1853
1946
|
* module to bind the callbacks the the caller context.
|
|
@@ -2279,6 +2372,11 @@ declare namespace tracer {
|
|
|
2279
2372
|
};
|
|
2280
2373
|
}
|
|
2281
2374
|
|
|
2375
|
+
/**
|
|
2376
|
+
* This plugin integrates with [nyc](https://github.com/istanbuljs/nyc) for CI visibility.
|
|
2377
|
+
*/
|
|
2378
|
+
interface nyc extends Integration {}
|
|
2379
|
+
|
|
2282
2380
|
/**
|
|
2283
2381
|
* This plugin automatically instruments the
|
|
2284
2382
|
* [openai](https://platform.openai.com/docs/api-reference?lang=node.js) module.
|
|
@@ -2465,6 +2563,32 @@ declare namespace tracer {
|
|
|
2465
2563
|
*/
|
|
2466
2564
|
interface vitest extends Integration {}
|
|
2467
2565
|
|
|
2566
|
+
/**
|
|
2567
|
+
* This plugin implements shared web request instrumentation helpers.
|
|
2568
|
+
*/
|
|
2569
|
+
interface web extends HttpServer {
|
|
2570
|
+
/**
|
|
2571
|
+
* Custom filter function used to decide whether a URL/path should be instrumented.
|
|
2572
|
+
* Takes precedence over allowlist/blocklist.
|
|
2573
|
+
*/
|
|
2574
|
+
filter?: (urlOrPath: string) => boolean;
|
|
2575
|
+
|
|
2576
|
+
/**
|
|
2577
|
+
* Whether (or how) to obfuscate querystring values in `http.url`.
|
|
2578
|
+
*
|
|
2579
|
+
* - `true`: obfuscate all values
|
|
2580
|
+
* - `false`: disable obfuscation
|
|
2581
|
+
* - `string`: regex string used to obfuscate matching values (empty string disables)
|
|
2582
|
+
* - `RegExp`: regex used to obfuscate matching values
|
|
2583
|
+
*/
|
|
2584
|
+
queryStringObfuscation?: boolean | string | RegExp;
|
|
2585
|
+
|
|
2586
|
+
/**
|
|
2587
|
+
* Whether to enable resource renaming when the framework route is unavailable.
|
|
2588
|
+
*/
|
|
2589
|
+
resourceRenamingEnabled?: boolean;
|
|
2590
|
+
}
|
|
2591
|
+
|
|
2468
2592
|
/**
|
|
2469
2593
|
* This plugin patches the [winston](https://github.com/winstonjs/winston)
|
|
2470
2594
|
* to automatically inject trace identifiers in log records when the
|
|
@@ -2472,6 +2596,18 @@ declare namespace tracer {
|
|
|
2472
2596
|
* on the tracer.
|
|
2473
2597
|
*/
|
|
2474
2598
|
interface winston extends Integration {}
|
|
2599
|
+
|
|
2600
|
+
/**
|
|
2601
|
+
* This plugin automatically instruments the
|
|
2602
|
+
* [ws](https://github.com/websockets/ws) module.
|
|
2603
|
+
*/
|
|
2604
|
+
interface ws extends Instrumentation {
|
|
2605
|
+
/**
|
|
2606
|
+
* Controls whether websocket messages should be traced.
|
|
2607
|
+
* This is also configurable via `DD_TRACE_WEBSOCKET_MESSAGES_ENABLED`.
|
|
2608
|
+
*/
|
|
2609
|
+
traceWebsocketMessagesEnabled?: boolean;
|
|
2610
|
+
}
|
|
2475
2611
|
}
|
|
2476
2612
|
|
|
2477
2613
|
export namespace opentelemetry {
|
|
@@ -2993,6 +3129,14 @@ declare namespace tracer {
|
|
|
2993
3129
|
*/
|
|
2994
3130
|
annotationContext<T> (options: llmobs.AnnotationContextOptions, fn: () => T): T
|
|
2995
3131
|
|
|
3132
|
+
/**
|
|
3133
|
+
* Execute a function within a routing context, directing all LLMObs spans to a specific Datadog organization.
|
|
3134
|
+
* @param options The routing context options containing the target API key and optional site.
|
|
3135
|
+
* @param fn The callback over which to apply the routing context.
|
|
3136
|
+
* @returns The result of the function.
|
|
3137
|
+
*/
|
|
3138
|
+
routingContext<T> (options: llmobs.RoutingContextOptions, fn: () => T): T
|
|
3139
|
+
|
|
2996
3140
|
/**
|
|
2997
3141
|
* Flushes any remaining spans and evaluation metrics to LLM Observability.
|
|
2998
3142
|
*/
|
|
@@ -3118,6 +3262,49 @@ declare namespace tracer {
|
|
|
3118
3262
|
type?: string
|
|
3119
3263
|
}
|
|
3120
3264
|
|
|
3265
|
+
/**
|
|
3266
|
+
* A Prompt object that represents the prompt template used for an LLM call.
|
|
3267
|
+
* Used to power LLM Observability prompts and hallucination evaluations.
|
|
3268
|
+
*/
|
|
3269
|
+
interface Prompt {
|
|
3270
|
+
/**
|
|
3271
|
+
* Version of the prompt
|
|
3272
|
+
*/
|
|
3273
|
+
version?: string,
|
|
3274
|
+
|
|
3275
|
+
|
|
3276
|
+
/**
|
|
3277
|
+
* The id of the prompt set by the user. Should be unique per mlApp.
|
|
3278
|
+
*/
|
|
3279
|
+
id?: string,
|
|
3280
|
+
|
|
3281
|
+
/**
|
|
3282
|
+
* An object of string key-value pairs that will be used to render the prompt
|
|
3283
|
+
*/
|
|
3284
|
+
variables?: Record<string, string>,
|
|
3285
|
+
|
|
3286
|
+
/**
|
|
3287
|
+
* List of tags to add to the prompt run.
|
|
3288
|
+
*/
|
|
3289
|
+
tags?: Record<string, string>,
|
|
3290
|
+
|
|
3291
|
+
|
|
3292
|
+
/**
|
|
3293
|
+
* A list of variable key names that contains query information
|
|
3294
|
+
*/
|
|
3295
|
+
queryVariables?: string[],
|
|
3296
|
+
|
|
3297
|
+
/**
|
|
3298
|
+
* A list of variable key names that contain ground truth context information.
|
|
3299
|
+
*/
|
|
3300
|
+
contextVariables?: string[],
|
|
3301
|
+
|
|
3302
|
+
/**
|
|
3303
|
+
* A template string or chat message template list.
|
|
3304
|
+
*/
|
|
3305
|
+
template?: string | Message[]
|
|
3306
|
+
}
|
|
3307
|
+
|
|
3121
3308
|
/**
|
|
3122
3309
|
* Annotation options for LLM Observability spans.
|
|
3123
3310
|
*/
|
|
@@ -3151,7 +3338,12 @@ declare namespace tracer {
|
|
|
3151
3338
|
/**
|
|
3152
3339
|
* Object of JSON serializable key-value tag pairs to set or update on the LLM Observability span regarding the span's context.
|
|
3153
3340
|
*/
|
|
3154
|
-
tags?: { [key: string]: any }
|
|
3341
|
+
tags?: { [key: string]: any },
|
|
3342
|
+
|
|
3343
|
+
/**
|
|
3344
|
+
* A Prompt object that represents the prompt used for an LLM call. Only used on `llm` spans.
|
|
3345
|
+
*/
|
|
3346
|
+
prompt?: Prompt,
|
|
3155
3347
|
}
|
|
3156
3348
|
|
|
3157
3349
|
interface AnnotationContextOptions {
|
|
@@ -3164,6 +3356,23 @@ declare namespace tracer {
|
|
|
3164
3356
|
* Set to override the span name for any spans annotated within the returned context.
|
|
3165
3357
|
*/
|
|
3166
3358
|
name?: string,
|
|
3359
|
+
|
|
3360
|
+
/**
|
|
3361
|
+
* A Prompt object that represents the prompt used for an LLM call. Only used on `llm` spans.
|
|
3362
|
+
*/
|
|
3363
|
+
prompt?: Prompt,
|
|
3364
|
+
}
|
|
3365
|
+
|
|
3366
|
+
interface RoutingContextOptions {
|
|
3367
|
+
/**
|
|
3368
|
+
* The Datadog API key for the target organization.
|
|
3369
|
+
*/
|
|
3370
|
+
ddApiKey: string,
|
|
3371
|
+
|
|
3372
|
+
/**
|
|
3373
|
+
* The Datadog site for the target organization (e.g., 'datadoghq.eu').
|
|
3374
|
+
*/
|
|
3375
|
+
ddSite?: string,
|
|
3167
3376
|
}
|
|
3168
3377
|
|
|
3169
3378
|
/**
|
package/loader-hook.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as iitm from 'import-in-the-middle/hook.mjs'
|
|
2
2
|
import regexpEscapeModule from './vendor/dist/escape-string-regexp/index.js'
|
|
3
3
|
import hooks from './packages/datadog-instrumentations/src/helpers/hooks.js'
|
|
4
|
-
import configHelper from './packages/dd-trace/src/config
|
|
4
|
+
import configHelper from './packages/dd-trace/src/config/helper.js'
|
|
5
5
|
import * as rewriterLoader from './packages/datadog-instrumentations/src/helpers/rewriter/loader.mjs'
|
|
6
6
|
import { isRelativeRequire } from './packages/datadog-instrumentations/src/helpers/shared-utils.js'
|
|
7
7
|
|