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.
Files changed (150) hide show
  1. package/LICENSE-3rdparty.csv +77 -79
  2. package/ci/init.js +6 -6
  3. package/index.d.ts +213 -4
  4. package/loader-hook.mjs +1 -1
  5. package/package.json +59 -56
  6. package/packages/datadog-core/src/storage.js +7 -7
  7. package/packages/datadog-esbuild/index.js +6 -0
  8. package/packages/datadog-instrumentations/src/ai.js +7 -3
  9. package/packages/datadog-instrumentations/src/child_process.js +1 -1
  10. package/packages/datadog-instrumentations/src/cucumber.js +1 -1
  11. package/packages/datadog-instrumentations/src/graphql.js +1 -1
  12. package/packages/datadog-instrumentations/src/helpers/instrumentations.js +4 -3
  13. package/packages/datadog-instrumentations/src/helpers/register.js +3 -7
  14. package/packages/datadog-instrumentations/src/helpers/rewriter/compiler.js +6 -0
  15. package/packages/datadog-instrumentations/src/helpers/rewriter/index.js +2 -1
  16. package/packages/datadog-instrumentations/src/helpers/rewriter/transforms.js +73 -16
  17. package/packages/datadog-instrumentations/src/http/client.js +2 -2
  18. package/packages/datadog-instrumentations/src/jest.js +124 -64
  19. package/packages/datadog-instrumentations/src/koa.js +2 -1
  20. package/packages/datadog-instrumentations/src/light-my-request.js +2 -2
  21. package/packages/datadog-instrumentations/src/mocha/main.js +2 -2
  22. package/packages/datadog-instrumentations/src/mocha/worker.js +1 -1
  23. package/packages/datadog-instrumentations/src/mocha.js +1 -1
  24. package/packages/datadog-instrumentations/src/mysql.js +1 -1
  25. package/packages/datadog-instrumentations/src/mysql2.js +2 -2
  26. package/packages/datadog-instrumentations/src/net.js +13 -5
  27. package/packages/datadog-instrumentations/src/nyc.js +1 -1
  28. package/packages/datadog-instrumentations/src/otel-sdk-trace.js +4 -4
  29. package/packages/datadog-instrumentations/src/pg.js +4 -2
  30. package/packages/datadog-instrumentations/src/playwright.js +15 -11
  31. package/packages/datadog-instrumentations/src/selenium.js +2 -2
  32. package/packages/datadog-instrumentations/src/undici.js +12 -1
  33. package/packages/datadog-plugin-aws-sdk/src/base.js +4 -4
  34. package/packages/datadog-plugin-azure-event-hubs/src/producer.js +2 -2
  35. package/packages/datadog-plugin-azure-service-bus/src/producer.js +2 -2
  36. package/packages/datadog-plugin-cucumber/src/index.js +35 -34
  37. package/packages/datadog-plugin-cypress/src/cypress-plugin.js +2 -2
  38. package/packages/datadog-plugin-dd-trace-api/src/index.js +2 -2
  39. package/packages/datadog-plugin-express/src/code_origin.js +21 -15
  40. package/packages/datadog-plugin-fastify/src/code_origin.js +17 -4
  41. package/packages/datadog-plugin-jest/src/index.js +2 -2
  42. package/packages/datadog-plugin-mocha/src/index.js +2 -2
  43. package/packages/datadog-plugin-mongodb-core/src/index.js +2 -2
  44. package/packages/datadog-plugin-playwright/src/index.js +26 -26
  45. package/packages/datadog-plugin-undici/src/index.js +305 -2
  46. package/packages/datadog-plugin-vitest/src/index.js +5 -5
  47. package/packages/datadog-shimmer/src/shimmer.js +2 -5
  48. package/packages/dd-trace/index.js +19 -0
  49. package/packages/dd-trace/src/agent/info.js +57 -0
  50. package/packages/dd-trace/src/agent/url.js +28 -0
  51. package/packages/dd-trace/src/appsec/iast/taint-tracking/rewriter.js +1 -1
  52. package/packages/dd-trace/src/appsec/index.js +47 -7
  53. package/packages/dd-trace/src/appsec/rasp/index.js +2 -4
  54. package/packages/dd-trace/src/azure_metadata.js +8 -3
  55. package/packages/dd-trace/src/baggage.js +36 -11
  56. package/packages/dd-trace/src/ci-visibility/dynamic-instrumentation/index.js +5 -1
  57. package/packages/dd-trace/src/ci-visibility/early-flake-detection/get-known-tests.js +2 -2
  58. package/packages/dd-trace/src/ci-visibility/exporters/agent-proxy/index.js +3 -4
  59. package/packages/dd-trace/src/ci-visibility/exporters/agentless/coverage-writer.js +2 -2
  60. package/packages/dd-trace/src/ci-visibility/exporters/agentless/di-logs-writer.js +5 -5
  61. package/packages/dd-trace/src/ci-visibility/exporters/agentless/writer.js +2 -2
  62. package/packages/dd-trace/src/ci-visibility/exporters/ci-visibility-exporter.js +5 -11
  63. package/packages/dd-trace/src/ci-visibility/exporters/git/git_metadata.js +3 -3
  64. package/packages/dd-trace/src/ci-visibility/exporters/test-worker/index.js +4 -4
  65. package/packages/dd-trace/src/ci-visibility/exporters/test-worker/writer.js +1 -1
  66. package/packages/dd-trace/src/ci-visibility/intelligent-test-runner/get-skippable-suites.js +2 -2
  67. package/packages/dd-trace/src/ci-visibility/log-submission/log-submission-plugin.js +4 -4
  68. package/packages/dd-trace/src/ci-visibility/requests/get-library-configuration.js +4 -4
  69. package/packages/dd-trace/src/ci-visibility/telemetry.js +6 -2
  70. package/packages/dd-trace/src/ci-visibility/test-management/get-test-management-tests.js +2 -2
  71. package/packages/dd-trace/src/{config_defaults.js → config/defaults.js} +3 -3
  72. package/packages/dd-trace/src/{config-helper.js → config/helper.js} +88 -15
  73. package/packages/dd-trace/src/{config.js → config/index.js} +107 -46
  74. package/packages/dd-trace/src/config/remote_config.js +188 -19
  75. package/packages/dd-trace/src/{config_stable.js → config/stable.js} +20 -32
  76. package/packages/dd-trace/src/{supported-configurations.json → config/supported-configurations.json} +3 -1
  77. package/packages/dd-trace/src/crashtracking/crashtracker.js +2 -5
  78. package/packages/dd-trace/src/datastreams/processor.js +1 -1
  79. package/packages/dd-trace/src/datastreams/writer.js +2 -8
  80. package/packages/dd-trace/src/debugger/devtools_client/condition.js +1 -1
  81. package/packages/dd-trace/src/debugger/devtools_client/config.js +2 -7
  82. package/packages/dd-trace/src/debugger/devtools_client/json-buffer.js +10 -11
  83. package/packages/dd-trace/src/debugger/devtools_client/send.js +3 -3
  84. package/packages/dd-trace/src/debugger/devtools_client/snapshot/constants.js +1 -1
  85. package/packages/dd-trace/src/debugger/index.js +83 -15
  86. package/packages/dd-trace/src/dogstatsd.js +5 -11
  87. package/packages/dd-trace/src/encode/0.4.js +2 -2
  88. package/packages/dd-trace/src/exporter.js +1 -1
  89. package/packages/dd-trace/src/exporters/agent/index.js +5 -11
  90. package/packages/dd-trace/src/exporters/agent/writer.js +12 -16
  91. package/packages/dd-trace/src/exporters/common/{agent-info-exporter.js → buffering-exporter.js} +10 -37
  92. package/packages/dd-trace/src/exporters/common/docker.js +2 -2
  93. package/packages/dd-trace/src/exporters/common/request.js +1 -1
  94. package/packages/dd-trace/src/exporters/common/util.js +2 -2
  95. package/packages/dd-trace/src/exporters/span-stats/index.js +3 -10
  96. package/packages/dd-trace/src/flare/index.js +1 -1
  97. package/packages/dd-trace/src/guardrails/telemetry.js +1 -1
  98. package/packages/dd-trace/src/index.js +4 -4
  99. package/packages/dd-trace/src/lambda/handler.js +2 -2
  100. package/packages/dd-trace/src/lambda/index.js +2 -2
  101. package/packages/dd-trace/src/lambda/runtime/patch.js +2 -2
  102. package/packages/dd-trace/src/lambda/runtime/ritm.js +2 -2
  103. package/packages/dd-trace/src/llmobs/constants/tags.js +8 -1
  104. package/packages/dd-trace/src/llmobs/index.js +2 -2
  105. package/packages/dd-trace/src/llmobs/noop.js +2 -0
  106. package/packages/dd-trace/src/llmobs/plugins/openai/index.js +3 -4
  107. package/packages/dd-trace/src/llmobs/sdk.js +33 -6
  108. package/packages/dd-trace/src/llmobs/span_processor.js +17 -7
  109. package/packages/dd-trace/src/llmobs/tagger.js +175 -1
  110. package/packages/dd-trace/src/llmobs/writers/base.js +118 -45
  111. package/packages/dd-trace/src/llmobs/writers/spans.js +4 -3
  112. package/packages/dd-trace/src/llmobs/writers/util.js +3 -9
  113. package/packages/dd-trace/src/log/index.js +50 -35
  114. package/packages/dd-trace/src/log/writer.js +13 -78
  115. package/packages/dd-trace/src/noop/proxy.js +3 -3
  116. package/packages/dd-trace/src/openfeature/writers/base.js +9 -16
  117. package/packages/dd-trace/src/openfeature/writers/util.js +3 -8
  118. package/packages/dd-trace/src/opentelemetry/otlp/otlp_http_exporter_base.js +2 -2
  119. package/packages/dd-trace/src/opentelemetry/tracer.js +48 -6
  120. package/packages/dd-trace/src/opentracing/propagation/text_map.js +45 -21
  121. package/packages/dd-trace/src/opentracing/span.js +4 -4
  122. package/packages/dd-trace/src/plugin_manager.js +8 -6
  123. package/packages/dd-trace/src/plugins/util/ci.js +5 -8
  124. package/packages/dd-trace/src/plugins/util/git-cache.js +3 -3
  125. package/packages/dd-trace/src/plugins/util/test.js +1 -1
  126. package/packages/dd-trace/src/plugins/util/user-provided-git.js +41 -43
  127. package/packages/dd-trace/src/profiler.js +4 -39
  128. package/packages/dd-trace/src/profiling/config.js +74 -34
  129. package/packages/dd-trace/src/profiling/exporter_cli.js +5 -5
  130. package/packages/dd-trace/src/profiling/exporters/agent.js +1 -1
  131. package/packages/dd-trace/src/profiling/exporters/event_serializer.js +9 -2
  132. package/packages/dd-trace/src/profiling/index.js +1 -1
  133. package/packages/dd-trace/src/profiling/libuv-size.js +1 -1
  134. package/packages/dd-trace/src/profiling/profiler.js +57 -2
  135. package/packages/dd-trace/src/proxy.js +34 -5
  136. package/packages/dd-trace/src/remote_config/capabilities.js +4 -0
  137. package/packages/dd-trace/src/remote_config/index.js +2 -7
  138. package/packages/dd-trace/src/ritm.js +8 -4
  139. package/packages/dd-trace/src/runtime_metrics/runtime_metrics.js +2 -2
  140. package/packages/dd-trace/src/serverless.js +2 -2
  141. package/packages/dd-trace/src/span_processor.js +2 -2
  142. package/packages/dd-trace/src/startup-log.js +7 -16
  143. package/packages/dd-trace/src/telemetry/endpoints.js +67 -5
  144. package/packages/dd-trace/src/telemetry/send-data.js +103 -4
  145. package/packages/dd-trace/src/telemetry/telemetry.js +229 -110
  146. package/vendor/dist/@isaacs/ttlcache/index.js +1 -1
  147. package/vendor/dist/esquery/index.js +1 -1
  148. package/vendor/dist/meriyah/index.js +1 -1
  149. package/vendor/dist/protobufjs/index.js +1 -1
  150. /package/packages/dd-trace/src/{git_properties.js → config/git_properties.js} +0 -0
@@ -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/source-map","npm:@datadog/source-map","[]","[]"
11
- "@datadog/wasm-js-rewriter","https://github.com/DataDog/dd-wasm-js-rewriter","['Apache-2.0']","['Datadog Inc.']"
12
- "@isaacs/ttlcache","https://github.com/isaacs/ttlcache","['BlueOak-1.0.0']","['Isaac Z. Schlueter']"
13
- "@jsep-plugin/assignment","https://github.com/EricSmekens/jsep","['MIT']","['Shelly']"
14
- "@jsep-plugin/regex","https://github.com/EricSmekens/jsep","['MIT']","['Shelly']"
15
- "@openfeature/server-sdk","https://github.com/open-feature/js-sdk","['Apache-2.0']","['open-feature']"
16
- "@opentelemetry/api","https://github.com/open-telemetry/opentelemetry-js","['Apache-2.0']","['OpenTelemetry Authors']"
17
- "@opentelemetry/api-logs","https://github.com/open-telemetry/opentelemetry-js","['Apache-2.0']","['OpenTelemetry Authors']"
18
- "@opentelemetry/core","https://github.com/open-telemetry/opentelemetry-js","['Apache-2.0']","['OpenTelemetry Authors']"
19
- "@opentelemetry/resources","https://github.com/open-telemetry/opentelemetry-js","['Apache-2.0']","['OpenTelemetry Authors']"
20
- "@opentelemetry/semantic-conventions","https://github.com/open-telemetry/opentelemetry-js","['Apache-2.0']","['OpenTelemetry Authors']"
21
- "@protobufjs/aspromise","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
22
- "@protobufjs/base64","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
23
- "@protobufjs/codegen","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
24
- "@protobufjs/eventemitter","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
25
- "@protobufjs/fetch","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
26
- "@protobufjs/float","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
27
- "@protobufjs/inquire","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
28
- "@protobufjs/path","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
29
- "@protobufjs/pool","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
30
- "@protobufjs/utf8","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
31
- "@types/node","https://github.com/DefinitelyTyped/DefinitelyTyped","['MIT']","['DefinitelyTyped']"
32
- "acorn","https://github.com/acornjs/acorn","['MIT']","['acornjs']"
33
- "acorn-import-attributes","https://github.com/xtuc/acorn-import-attributes","['MIT']","['Sven Sauleau']"
34
- "argparse","https://github.com/nodeca/argparse","['Python-2.0']","['nodeca']"
35
- "astring","https://github.com/davidbonnet/astring","['MIT']","['David Bonnet']"
36
- "cjs-module-lexer","https://github.com/nodejs/cjs-module-lexer","['MIT']","['Guy Bedford']"
37
- "crypto-randomuuid","npm:crypto-randomuuid","['MIT']","['Stephen Belanger']"
38
- "dc-polyfill","https://github.com/DataDog/dc-polyfill","['MIT']","['Thomas Hunter II']"
39
- "dd-trace","https://github.com/DataDog/dd-trace-js","['(Apache-2.0 OR BSD-3-Clause)']","['Datadog Inc. <info@datadoghq.com>']"
40
- "delay","https://github.com/sindresorhus/delay","['MIT']","['Sindre Sorhus']"
41
- "detect-newline","https://github.com/sindresorhus/detect-newline","['MIT']","['Sindre Sorhus']"
42
- "escape-string-regexp","https://github.com/sindresorhus/escape-string-regexp","['MIT']","['Sindre Sorhus']"
43
- "esquery","https://github.com/estools/esquery","['BSD-3-Clause']","['Joel Feenstra']"
44
- "estraverse","https://github.com/estools/estraverse","['BSD-2-Clause']","['estools']"
45
- "fast-fifo","https://github.com/mafintosh/fast-fifo","['MIT']","['Mathias Buus']"
46
- "ignore","https://github.com/kaelzhang/node-ignore","['MIT']","['kael']"
47
- "import-in-the-middle","https://github.com/nodejs/import-in-the-middle","['Apache-2.0']","['Bryan English']"
48
- "istanbul-lib-coverage","https://github.com/istanbuljs/istanbuljs","['BSD-3-Clause']","['Krishnan Anantheswaran']"
49
- "jest-docblock","https://github.com/jestjs/jest","['MIT']","['jestjs']"
50
- "js-yaml","https://github.com/nodeca/js-yaml","['MIT']","['Vladimir Zapparov']"
51
- "jsep","https://github.com/EricSmekens/jsep","['MIT']","['Stephen Oney']"
52
- "jsonpath-plus","https://github.com/JSONPath-Plus/JSONPath","['MIT']","['Stefan Goessner']"
53
- "limiter","https://github.com/jhurliman/node-rate-limiter","['MIT']","['John Hurliman']"
54
- "lodash.sortby","https://github.com/lodash/lodash","['MIT']","['John-David Dalton']"
55
- "long","https://github.com/dcodeIO/long.js","['Apache-2.0']","['Daniel Wirtz']"
56
- "lru-cache","https://github.com/isaacs/node-lru-cache","['ISC']","['Isaac Z. Schlueter']"
57
- "meriyah","https://github.com/meriyah/meriyah","['ISC']","['Kenny F.']"
58
- "module-details-from-path","https://github.com/watson/module-details-from-path","['MIT']","['Thomas Watson']"
59
- "mutexify","https://github.com/mafintosh/mutexify","['MIT']","['Mathias Buus']"
60
- "node-addon-api","https://github.com/nodejs/node-addon-api","['MIT']","['nodejs']"
61
- "node-gyp-build","https://github.com/prebuild/node-gyp-build","['MIT']","['Mathias Buus']"
62
- "opentracing","https://github.com/opentracing/opentracing-javascript","['Apache-2.0']","['opentracing']"
63
- "p-limit","https://github.com/sindresorhus/p-limit","['MIT']","['Sindre Sorhus']"
64
- "path-to-regexp","https://github.com/pillarjs/path-to-regexp","['MIT']","['pillarjs']"
65
- "pprof-format","https://github.com/DataDog/pprof-format","['MIT']","['Datadog Inc.']"
66
- "protobufjs","https://github.com/protobufjs/protobuf.js","['BSD-3-Clause']","['Daniel Wirtz']"
67
- "queue-tick","https://github.com/mafintosh/queue-tick","['MIT']","['Mathias Buus']"
68
- "retry","https://github.com/tim-kos/node-retry","['MIT']","['Tim Koschützki']"
69
- "rfdc","https://github.com/davidmarkclements/rfdc","['MIT']","['David Mark Clements']"
70
- "semifies","https://github.com/holepunchto/semifies","['Apache-2.0']","['Holepunch Inc']"
71
- "shell-quote","https://github.com/ljharb/shell-quote","['MIT']","['James Halliday']"
72
- "source-map","https://github.com/mozilla/source-map","['BSD-3-Clause']","['Nick Fitzgerald']"
73
- "spark-md5","https://github.com/satazor/js-spark-md5","['(WTFPL OR MIT)']","['André Cruz']"
74
- "tlhunter-sorted-set","https://github.com/tlhunter/node-sorted-set","['MIT']","['Thomas Hunter II']"
75
- "ttl-set","https://github.com/watson/ttl-set","['MIT']","['Thomas Watson']"
76
- "undici-types","https://github.com/nodejs/undici","['MIT']","['nodejs']"
77
- "yocto-queue","https://github.com/sindresorhus/yocto-queue","['MIT']","['Sindre Sorhus']"
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-helper')
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 (getEnvironmentVariable('DD_PLAYWRIGHT_WORKER')) return 'playwright'
30
+ if (getValueFromEnvSources('DD_PLAYWRIGHT_WORKER')) return 'playwright'
31
31
  if (getEnvironmentVariable('TINYPOOL_WORKER_ID')) return 'vitest'
32
- if (getEnvironmentVariable('DD_VITEST_WORKER')) return 'vitest'
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(getEnvironmentVariable('DD_CIVISIBILITY_ENABLED'))
47
- const isAgentlessEnabled = isTrue(getEnvironmentVariable('DD_CIVISIBILITY_AGENTLESS_ENABLED'))
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 (getEnvironmentVariable('DD_API_KEY')) {
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 DD_FLAGGING_PROVIDER_ENABLED=true.
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-helper.js'
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