@depup/dd-trace 6.10.0-depup.0 → 6.11.0-depup.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 (138) hide show
  1. package/README.md +2 -2
  2. package/changes.json +1 -1
  3. package/index.d.ts +108 -3
  4. package/initialize.mjs +28 -17
  5. package/openfeature.js +2 -2
  6. package/package.json +13 -10
  7. package/packages/datadog-esbuild/index.js +0 -34
  8. package/packages/datadog-instrumentations/src/anthropic.js +210 -15
  9. package/packages/datadog-instrumentations/src/aws-sdk.js +9 -1
  10. package/packages/datadog-instrumentations/src/browser-bunyan.js +11 -0
  11. package/packages/datadog-instrumentations/src/bunyan.js +3 -16
  12. package/packages/datadog-instrumentations/src/cucumber.js +26 -11
  13. package/packages/datadog-instrumentations/src/cypress-config.js +182 -16
  14. package/packages/datadog-instrumentations/src/cypress-legacy-finalizers.js +30 -0
  15. package/packages/datadog-instrumentations/src/cypress.js +2 -0
  16. package/packages/datadog-instrumentations/src/fastify.js +2 -0
  17. package/packages/datadog-instrumentations/src/helpers/bunyan.js +22 -0
  18. package/packages/datadog-instrumentations/src/helpers/hooks.js +2 -1
  19. package/packages/datadog-instrumentations/src/helpers/pool-acquire.js +9 -4
  20. package/packages/datadog-instrumentations/src/helpers/register.js +10 -8
  21. package/packages/datadog-instrumentations/src/jest.js +25 -17
  22. package/packages/datadog-instrumentations/src/mariadb.js +278 -21
  23. package/packages/datadog-instrumentations/src/mocha/main.js +539 -55
  24. package/packages/datadog-instrumentations/src/mocha/utils.js +130 -17
  25. package/packages/datadog-instrumentations/src/playwright-reporter.js +99 -0
  26. package/packages/datadog-instrumentations/src/playwright.js +149 -2
  27. package/packages/datadog-instrumentations/src/router.js +2 -0
  28. package/packages/datadog-instrumentations/src/vitest-main.js +11 -3
  29. package/packages/datadog-plugin-aws-sdk/src/base.js +1 -0
  30. package/packages/datadog-plugin-aws-sdk/src/services/eventbridge.js +163 -44
  31. package/packages/datadog-plugin-aws-sdk/src/services/kinesis.js +2 -8
  32. package/packages/datadog-plugin-azure-functions/src/index.js +1 -1
  33. package/packages/datadog-plugin-browser-bunyan/src/index.js +9 -0
  34. package/packages/datadog-plugin-bunyan/src/index.js +5 -8
  35. package/packages/datadog-plugin-cucumber/src/index.js +11 -0
  36. package/packages/datadog-plugin-cypress/src/after-run.js +5 -1
  37. package/packages/datadog-plugin-cypress/src/after-spec.js +5 -1
  38. package/packages/datadog-plugin-cypress/src/cypress-plugin.js +81 -29
  39. package/packages/datadog-plugin-cypress/src/finalization.js +76 -0
  40. package/packages/datadog-plugin-cypress/src/index.js +12 -6
  41. package/packages/datadog-plugin-cypress/src/plugin.js +16 -3
  42. package/packages/datadog-plugin-dd-trace-api/src/index.js +4 -0
  43. package/packages/datadog-plugin-electron/src/index.js +2 -0
  44. package/packages/datadog-plugin-fs/src/index.js +1 -1
  45. package/packages/datadog-plugin-jest/src/index.js +6 -0
  46. package/packages/datadog-plugin-mocha/src/index.js +56 -1
  47. package/packages/datadog-plugin-nats/src/index.js +1 -1
  48. package/packages/datadog-plugin-openai/src/tracing.js +41 -30
  49. package/packages/datadog-plugin-openai-agents/src/integration.js +1 -0
  50. package/packages/datadog-plugin-playwright/src/index.js +42 -13
  51. package/packages/datadog-plugin-vitest/src/index.js +6 -0
  52. package/packages/datadog-webpack/index.js +0 -11
  53. package/packages/dd-trace/index.js +0 -1
  54. package/packages/dd-trace/src/agent/info.js +6 -5
  55. package/packages/dd-trace/src/aiguard/client.js +100 -1
  56. package/packages/dd-trace/src/aiguard/errors.js +41 -0
  57. package/packages/dd-trace/src/aiguard/evaluation.js +357 -0
  58. package/packages/dd-trace/src/aiguard/integrations/anthropic.js +70 -0
  59. package/packages/dd-trace/src/aiguard/integrations/index.js +4 -0
  60. package/packages/dd-trace/src/aiguard/messages/anthropic.js +423 -0
  61. package/packages/dd-trace/src/aiguard/messages/openai.js +1 -24
  62. package/packages/dd-trace/src/aiguard/messages/utils.js +28 -0
  63. package/packages/dd-trace/src/aiguard/messages/vercel-ai.js +1 -11
  64. package/packages/dd-trace/src/aiguard/sdk.js +22 -278
  65. package/packages/dd-trace/src/appsec/iast/taint-tracking/rewriter.js +9 -12
  66. package/packages/dd-trace/src/ci-visibility/dynamic-instrumentation/worker/index.js +1 -0
  67. package/packages/dd-trace/src/ci-visibility/exporters/agent-proxy/index.js +27 -3
  68. package/packages/dd-trace/src/ci-visibility/exporters/agentless/coverage-writer.js +22 -6
  69. package/packages/dd-trace/src/ci-visibility/exporters/agentless/di-logs-writer.js +21 -5
  70. package/packages/dd-trace/src/ci-visibility/exporters/agentless/request-tracker.js +164 -0
  71. package/packages/dd-trace/src/ci-visibility/exporters/agentless/writer.js +22 -6
  72. package/packages/dd-trace/src/ci-visibility/exporters/ci-visibility-exporter.js +365 -32
  73. package/packages/dd-trace/src/ci-visibility/exporters/request.js +201 -0
  74. package/packages/dd-trace/src/ci-visibility/exporters/test-worker/index.js +5 -3
  75. package/packages/dd-trace/src/ci-visibility/exporters/test-worker/writer.js +9 -5
  76. package/packages/dd-trace/src/ci-visibility/intelligent-test-runner/get-skippable-suites.js +2 -1
  77. package/packages/dd-trace/src/ci-visibility/requests/rate-limit.js +39 -0
  78. package/packages/dd-trace/src/ci-visibility/requests/request.js +3 -6
  79. package/packages/dd-trace/src/ci-visibility/requests/upload-test-screenshot.js +6 -2
  80. package/packages/dd-trace/src/config/generated-config-types.d.ts +4 -0
  81. package/packages/dd-trace/src/config/index.js +13 -2
  82. package/packages/dd-trace/src/config/major-overrides.js +7 -0
  83. package/packages/dd-trace/src/config/supported-configurations.json +14 -0
  84. package/packages/dd-trace/src/datastreams/index.js +2 -0
  85. package/packages/dd-trace/src/datastreams/manager.js +9 -2
  86. package/packages/dd-trace/src/datastreams/processor.js +15 -13
  87. package/packages/dd-trace/src/datastreams/size.js +5 -0
  88. package/packages/dd-trace/src/debugger/devtools_client/index.js +3 -2
  89. package/packages/dd-trace/src/exporters/agent/writer.js +49 -9
  90. package/packages/dd-trace/src/exporters/common/buffering-exporter.js +6 -4
  91. package/packages/dd-trace/src/exporters/common/writer.js +11 -6
  92. package/packages/dd-trace/src/llmobs/experiments/client.js +163 -5
  93. package/packages/dd-trace/src/llmobs/experiments/dataset.js +241 -87
  94. package/packages/dd-trace/src/llmobs/experiments/experiment.js +280 -20
  95. package/packages/dd-trace/src/llmobs/experiments/index.js +58 -59
  96. package/packages/dd-trace/src/llmobs/experiments/noop.js +71 -3
  97. package/packages/dd-trace/src/llmobs/experiments/result.js +1 -0
  98. package/packages/dd-trace/src/llmobs/experiments/util.js +41 -5
  99. package/packages/dd-trace/src/llmobs/plugins/ai/util.js +12 -3
  100. package/packages/dd-trace/src/llmobs/plugins/base.js +4 -2
  101. package/packages/dd-trace/src/noop/proxy.js +3 -4
  102. package/packages/dd-trace/src/openfeature/flagging_provider.js +18 -2
  103. package/packages/dd-trace/src/openfeature/remote_config.js +1 -1
  104. package/packages/dd-trace/src/opentelemetry/context_manager.js +7 -7
  105. package/packages/dd-trace/src/opentelemetry/logs/batch_log_processor.js +2 -1
  106. package/packages/dd-trace/src/opentelemetry/logs/logger.js +67 -11
  107. package/packages/dd-trace/src/opentelemetry/logs/otlp_transformer.js +14 -3
  108. package/packages/dd-trace/src/opentelemetry/metrics/index.js +25 -12
  109. package/packages/dd-trace/src/opentelemetry/metrics/otlp_span_stats_exporter.js +2 -5
  110. package/packages/dd-trace/src/opentelemetry/metrics/otlp_span_stats_transformer.js +96 -43
  111. package/packages/dd-trace/src/opentracing/tracer.js +5 -2
  112. package/packages/dd-trace/src/otel-thread-ctx.js +387 -0
  113. package/packages/dd-trace/src/plugin_manager.js +3 -3
  114. package/packages/dd-trace/src/plugins/ci_plugin.js +6 -1
  115. package/packages/dd-trace/src/plugins/index.js +1 -0
  116. package/packages/dd-trace/src/plugins/util/jest.js +4 -3
  117. package/packages/dd-trace/src/plugins/util/test.js +9 -9
  118. package/packages/dd-trace/src/plugins/util/web.js +3 -0
  119. package/packages/dd-trace/src/profiling/profiler.js +1 -1
  120. package/packages/dd-trace/src/profiling/profilers/space.js +1 -3
  121. package/packages/dd-trace/src/profiling/profilers/wall.js +37 -90
  122. package/packages/dd-trace/src/profiling/webspan-utils.js +45 -0
  123. package/packages/dd-trace/src/proxy.js +38 -29
  124. package/packages/dd-trace/src/ritm.js +9 -2
  125. package/packages/dd-trace/src/serverless.js +37 -0
  126. package/packages/dd-trace/src/span_format.js +1 -0
  127. package/packages/dd-trace/src/span_stats.js +30 -3
  128. package/packages/dd-trace/src/storage-channels.js +86 -0
  129. package/packages/dd-trace/src/tracer.js +9 -2
  130. package/packages/dd-trace/src/tracer_metadata.js +14 -1
  131. package/packages/dd-trace/src/web-tags-cache.js +132 -0
  132. package/vendor/dist/@datadog/openfeature-node-server/LICENSE +201 -0
  133. package/vendor/dist/@datadog/openfeature-node-server/index.js +1 -0
  134. package/packages/datadog-instrumentations/src/helpers/optional-peer-bundler.js +0 -65
  135. package/packages/datadog-webpack/src/optional-peer-loader.js +0 -17
  136. package/packages/dd-trace/src/feature-registry.js +0 -29
  137. package/packages/dd-trace/src/openfeature/register.js +0 -35
  138. package/packages/dd-trace/src/openfeature/require-provider.js +0 -18
package/README.md CHANGED
@@ -13,8 +13,8 @@ npm install @depup/dd-trace
13
13
 
14
14
  | Field | Value |
15
15
  |-------|-------|
16
- | Original | [dd-trace](https://www.npmjs.com/package/dd-trace) @ 6.10.0 |
17
- | Processed | 2026-08-08 |
16
+ | Original | [dd-trace](https://www.npmjs.com/package/dd-trace) @ 6.11.0 |
17
+ | Processed | 2026-08-18 |
18
18
  | Smoke test | passed |
19
19
  | Deps updated | 1 |
20
20
 
package/changes.json CHANGED
@@ -5,6 +5,6 @@
5
5
  "to": "^3.3.3"
6
6
  }
7
7
  },
8
- "timestamp": "2026-08-08T00:22:31.720Z",
8
+ "timestamp": "2026-08-18T00:15:33.440Z",
9
9
  "totalUpdated": 1
10
10
  }
package/index.d.ts CHANGED
@@ -243,6 +243,7 @@ interface Plugins {
243
243
  "azure-functions": tracer.plugins.azure_functions;
244
244
  "azure-service-bus": tracer.plugins.azure_service_bus;
245
245
  "azure-durable-functions": tracer.plugins.azure_durable_functions
246
+ "browser-bunyan": tracer.plugins.browser_bunyan;
246
247
  "bullmq": tracer.plugins.bullmq;
247
248
  "bunyan": tracer.plugins.bunyan;
248
249
  "cassandra-driver": tracer.plugins.cassandra_driver;
@@ -1940,6 +1941,18 @@ declare namespace tracer {
1940
1941
  /** @hidden */
1941
1942
  interface Instrumentation extends Integration, Analyzable {}
1942
1943
 
1944
+ /** @hidden */
1945
+ interface LLMObsIntegration extends Integration {
1946
+ /**
1947
+ * Whether to capture LLM Observability spans for this integration. When set to `false`,
1948
+ * the integration keeps emitting APM spans and propagating trace context, but no LLM
1949
+ * Observability spans are produced. Useful when another integration already captures the
1950
+ * same operation and the payloads would otherwise be stored twice.
1951
+ * @default true
1952
+ */
1953
+ llmobs?: boolean;
1954
+ }
1955
+
1943
1956
  /** @hidden */
1944
1957
  interface DatabaseInstrumentation extends Instrumentation {
1945
1958
  /**
@@ -2333,11 +2346,13 @@ declare namespace tracer {
2333
2346
  interface azure_durable_functions extends Integration {}
2334
2347
 
2335
2348
  /**
2336
- * This plugin patches the [bunyan](https://github.com/trentm/node-bunyan)
2349
+ * This plugin patches the [browser-bunyan](https://github.com/philmander/browser-bunyan)
2337
2350
  * to automatically inject trace identifiers in log records when the
2338
2351
  * [logInjection](interfaces/traceroptions.html#logInjection) option is enabled
2339
2352
  * on the tracer.
2340
2353
  */
2354
+ interface browser_bunyan extends Integration {}
2355
+
2341
2356
  /**
2342
2357
  * This plugin automatically instruments the
2343
2358
  * [bullmq](https://github.com/npmjs/package/bullmq) message queue library.
@@ -2358,6 +2373,12 @@ declare namespace tracer {
2358
2373
  producerFilter?: (job: { name?: string; data?: unknown; opts?: unknown; queueName?: string }) => boolean;
2359
2374
  }
2360
2375
 
2376
+ /**
2377
+ * This plugin patches the [bunyan](https://github.com/trentm/node-bunyan)
2378
+ * to automatically inject trace identifiers in log records when the
2379
+ * [logInjection](interfaces/traceroptions.html#logInjection) option is enabled
2380
+ * on the tracer.
2381
+ */
2361
2382
  interface bunyan extends Integration {}
2362
2383
 
2363
2384
  /**
@@ -2804,7 +2825,7 @@ declare namespace tracer {
2804
2825
  * This plugin automatically instruments the
2805
2826
  * [langchain](https://js.langchain.com/) module
2806
2827
  */
2807
- interface langchain extends Instrumentation {}
2828
+ interface langchain extends Instrumentation, LLMObsIntegration {}
2808
2829
 
2809
2830
  /**
2810
2831
  * This plugin automatically instruments the
@@ -2846,7 +2867,7 @@ declare namespace tracer {
2846
2867
  * This plugin automatically instruments the
2847
2868
  * [modelcontextprotocol-sdk](https://github.com/npmjs/package/@modelcontextprotocol/sdk) library.
2848
2869
  */
2849
- interface modelcontextprotocol_sdk extends Instrumentation {}
2870
+ interface modelcontextprotocol_sdk extends Instrumentation, LLMObsIntegration {}
2850
2871
 
2851
2872
  /**
2852
2873
  * This plugin automatically instruments the
@@ -3852,6 +3873,79 @@ declare namespace tracer {
3852
3873
  url: string
3853
3874
  }
3854
3875
 
3876
+ type ExternalExperimentTimestamp = number | string | Date
3877
+
3878
+ interface StartExperimentDatasetOptions {
3879
+ /** Existing dataset id. When omitted, a placeholder dataset is created. */
3880
+ id?: string
3881
+ /** Dataset version to associate with the experiment. */
3882
+ version?: number
3883
+ /** Placeholder dataset name. Defaults to `<experiment name> dataset`. */
3884
+ name?: string
3885
+ /** Placeholder dataset description. */
3886
+ description?: string
3887
+ }
3888
+
3889
+ interface StartExperimentOptions {
3890
+ name: string
3891
+ description?: string
3892
+ /** Override the configured project name for this external experiment. */
3893
+ projectName?: string
3894
+ dataset?: StartExperimentDatasetOptions
3895
+ config?: Record<string, JSONType>
3896
+ metadata?: Record<string, JSONType>
3897
+ tags?: Record<string, string>
3898
+ }
3899
+
3900
+ interface ExternalExperimentSpanInput {
3901
+ name?: string
3902
+ input?: JSONType
3903
+ output?: JSONType
3904
+ expectedOutput?: JSONType
3905
+ metadata?: Record<string, JSONType>
3906
+ tags?: Record<string, string>
3907
+ startedAt?: ExternalExperimentTimestamp
3908
+ completedAt?: ExternalExperimentTimestamp
3909
+ durationMs?: number
3910
+ error?: string | Error | { type?: string, name?: string, message?: string, stack?: string }
3911
+ datasetRecordId?: string
3912
+ runId?: string
3913
+ runIteration?: number
3914
+ }
3915
+
3916
+ interface ExternalExperimentSpan {
3917
+ experimentId: string
3918
+ spanId: string
3919
+ traceId: string
3920
+ url: string | null
3921
+ }
3922
+
3923
+ interface ExternalExperimentMetric {
3924
+ label: string
3925
+ value?: JSONType
3926
+ error?: string | Error
3927
+ timestamp?: ExternalExperimentTimestamp
3928
+ tags?: Record<string, string>
3929
+ source?: string
3930
+ }
3931
+
3932
+ interface ExternalExperimentCloseOptions {
3933
+ status?: string
3934
+ error?: string | Error
3935
+ }
3936
+
3937
+ interface ExternalExperiment {
3938
+ experimentId (): string
3939
+ name (): string
3940
+ url (): string | null
3941
+ submitSpan (input?: ExternalExperimentSpanInput): Promise<ExternalExperimentSpan>
3942
+ submitEvaluationMetrics (
3943
+ span: { experimentId?: string, spanId: string, traceId: string },
3944
+ metrics: ExternalExperimentMetric[]
3945
+ ): Promise<void>
3946
+ close (options?: ExternalExperimentCloseOptions): Promise<void>
3947
+ }
3948
+
3855
3949
  interface DatasetPushResult {
3856
3950
  /** Number of records from this push that were confirmed with a record id. */
3857
3951
  pushedCount: number
@@ -3861,9 +3955,18 @@ declare namespace tracer {
3861
3955
 
3862
3956
  interface Dataset {
3863
3957
  addRecord (input: JSONType, expectedOutput?: JSONType, metadata?: Record<string, JSONType>): Dataset
3958
+ /** Update fields on an existing dataset record. */
3959
+ update (index: number, fields: {
3960
+ input?: JSONType
3961
+ expectedOutput?: JSONType
3962
+ metadata?: Record<string, JSONType>
3963
+ }): Dataset
3964
+ /** Delete an existing dataset record. */
3965
+ delete (index: number): Dataset
3864
3966
  /** Creates the dataset remotely if needed and pushes any unpushed records. */
3865
3967
  push (): Promise<DatasetPushResult>
3866
3968
  name (): string
3969
+ description (): string
3867
3970
  id (): string | null
3868
3971
  projectId (): string | null
3869
3972
  version (): number | null
@@ -3893,6 +3996,8 @@ declare namespace tracer {
3893
3996
  pullDataset (name: string, options?: PullDatasetOptions): Promise<Dataset>
3894
3997
  /** Build an experiment to run over a dataset. */
3895
3998
  experiment (options: ExperimentOptions): Experiment
3999
+ /** Start an externally-driven experiment. */
4000
+ startExperiment (options: StartExperimentOptions): Promise<ExternalExperiment>
3896
4001
  }
3897
4002
 
3898
4003
  interface LLMObservabilitySpan {
package/initialize.mjs CHANGED
@@ -16,19 +16,28 @@ import * as Module from 'module'
16
16
  import { types } from 'util'
17
17
  import { isMainThread } from 'worker_threads'
18
18
 
19
- // This file must support Node.js 12.0.0 syntax
19
+ // This file must support Node.js 14.13.1 syntax
20
20
 
21
- import {
22
- iitmExclusionRegExp,
23
- initialize as hookInitialize,
24
- load as hookLoad,
25
- resolve as hookResolve,
26
- } from './loader-hook.mjs?initialize'
21
+ const NODE_VERSION = process.versions.node
22
+
23
+ const brokenLoaders = NODE_VERSION.startsWith('18.0')
24
+ const isNode20LoaderWorker = !isMainThread && NODE_VERSION.startsWith('20.0')
25
+ const useDefaultLoader = brokenLoaders || isNode20LoaderWorker
26
+ // Avoid CommonJS in the loader worker on Node 20.0: https://github.com/nodejs/node/issues/47566
27
+ const loaderHook = useDefaultLoader ? undefined : await import('./loader-hook.mjs?initialize')
27
28
 
28
29
  let hasInsertedInit = false
29
30
  const initJsUrl = new URL('init.js', import.meta.url).href
30
31
  // `--loader` only reliably influences ESM entrypoints; for CJS apps use `--import`/`--require`.
31
32
 
33
+ // `globalPreload` is deprecated in favor of the `initialize` hook, but `initialize` only exists
34
+ // from Node 20.6 on, so it is the only way to run code in the application realm on Node 20.0.
35
+ export const globalPreload = isNode20LoaderWorker
36
+ ? () => `if (getBuiltin('module').createRequire(${JSON.stringify(import.meta.url)})('./init.js')) {
37
+ process.emitWarning('dd-trace cannot instrument ES modules on Node.js 20.0.0. Upgrade to Node.js 20.1.0 or newer.')
38
+ }`
39
+ : undefined
40
+
32
41
  /**
33
42
  * @param {{ source?: string|Buffer|Uint8Array, format?: string }} result
34
43
  * @param {unknown} _url_
@@ -63,26 +72,28 @@ function insertInit (result, _url_, context) {
63
72
  return result
64
73
  }
65
74
 
66
- const [NODE_MAJOR, NODE_MINOR] = process.versions.node.split('.').map(Number)
67
-
68
- const brokenLoaders = NODE_MAJOR === 18 && NODE_MINOR === 0
69
-
70
75
  // Node calls `initialize` only through `module.register`, never for `--loader`; without it
71
76
  // import-in-the-middle keeps its default matcher and proxies every application module. Loaders
72
77
  // before Node 18.19 share the application thread, where `loader-hook.mjs` builds no matcher.
73
- let needsHookInitialize = !isMainThread && !brokenLoaders
78
+ let needsHookInitialize = !isMainThread && !useDefaultLoader
74
79
 
75
- export async function load (url, context, nextLoad) {
80
+ /**
81
+ * @param {string} url
82
+ * @param {import('node:module').LoadHookContext & { isMain?: boolean }} context
83
+ * @param {Parameters<import('node:module').LoadHook>[2]} nextLoad
84
+ */
85
+ async function loadWithInit (url, context, nextLoad) {
76
86
  if (needsHookInitialize) {
77
87
  needsHookInitialize = false
78
- hookInitialize()
88
+ loaderHook.initialize()
79
89
  }
80
90
 
81
- const loadHook = (brokenLoaders || iitmExclusionRegExp.test(url)) ? nextLoad : hookLoad
82
- return insertInit(await loadHook(url, context, nextLoad), url, context)
91
+ const load = (useDefaultLoader || loaderHook.iitmExclusionRegExp.test(url)) ? nextLoad : loaderHook.load
92
+ return insertInit(await load(url, context, nextLoad), url, context)
83
93
  }
84
94
 
85
- export const resolve = brokenLoaders ? undefined : hookResolve
95
+ export const load = isNode20LoaderWorker ? undefined : loadWithInit
96
+ export const resolve = useDefaultLoader ? undefined : loaderHook.resolve
86
97
 
87
98
  if (isMainThread) {
88
99
  const require = Module.createRequire(import.meta.url)
package/openfeature.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use strict'
2
2
 
3
- // Static fallback for file tracers that do not recognize the optional-peer wrapper.
4
- require('@datadog/openfeature-node-server')
3
+ // Static fallback for file tracers that do not recognize the vendored provider's lazy require.
4
+ require('./vendor/dist/@datadog/openfeature-node-server')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@depup/dd-trace",
3
- "version": "6.10.0-depup.0",
3
+ "version": "6.11.0-depup.0",
4
4
  "description": "Datadog APM tracing client for JavaScript (with updated dependencies)",
5
5
  "main": "index.js",
6
6
  "typings": "index.d.ts",
@@ -47,7 +47,7 @@
47
47
  "test:esbuild:ci": "node scripts/c8-ci.js test:esbuild",
48
48
  "test:webpack": "mocha \"packages/datadog-webpack/test/**/*.spec.js\"",
49
49
  "test:webpack:ci": "node scripts/c8-ci.js test:webpack",
50
- "test:instrumentations": "mocha \"packages/datadog-instrumentations/test/@(${PLUGINS}).spec.js\"",
50
+ "test:instrumentations": "mocha --fail-zero \"packages/datadog-instrumentations/test/@(${PLUGINS}).spec.js\"",
51
51
  "test:instrumentations:ci": "yarn services && node scripts/c8-ci.js test:instrumentations",
52
52
  "test:instrumentations:misc": "mocha \"packages/datadog-instrumentations/test/*/**/*.spec.{js,mjs}\"",
53
53
  "test:instrumentations:misc:ci": "node scripts/c8-ci.js test:instrumentations:misc",
@@ -63,12 +63,14 @@
63
63
  "test:llmobs:plugins:ci": "yarn services && node scripts/c8-ci.js test:llmobs:plugins",
64
64
  "test:openfeature": "mocha \"packages/dd-trace/test/openfeature/**/*.spec.js\"",
65
65
  "test:openfeature:ci": "node scripts/c8-ci.js test:openfeature",
66
- "test:plugins": "node --expose-gc ./node_modules/mocha/bin/mocha.js \"packages/datadog-plugin-@(${PLUGINS})/test/**/${SPEC:-*}*.spec.js\"",
66
+ "test:plugins": "node --expose-gc ./node_modules/mocha/bin/mocha.js --fail-zero \"packages/datadog-plugin-@(${PLUGINS})/test/**/${SPEC:-*}*.spec.js\"",
67
67
  "test:plugins:ci": "yarn services && node scripts/c8-ci.js test:plugins",
68
68
  "test:plugins:ci:flaky": "yarn services && node scripts/c8-ci.js test:plugins --bail --retries 2",
69
69
  "test:plugins:upstream": "node ./packages/dd-trace/test/plugins/suite.js",
70
70
  "test:profiler": "node scripts/mocha-parallel-files.js --expose-gc --timeout 30000 -- \"packages/dd-trace/test/profiling/**/*.spec.js\"",
71
71
  "test:profiler:ci": "node scripts/c8-ci.js test:profiler",
72
+ "test:otel-thread-ctx": "mocha --timeout 60000 packages/dd-trace/test/otel-thread-ctx.spec.js",
73
+ "test:docker:otel-thread-ctx": "./scripts/docker/run-otel-thread-ctx-spec.sh",
72
74
  "test:integration": "mocha --timeout 60000 \"integration-tests/*.spec.js\"",
73
75
  "test:integration:coverage": "node ./integration-tests/coverage/run-suite.js --timeout 60000 \"integration-tests/*.spec.js\"",
74
76
  "test:integration:aiguard": "mocha --timeout 60000 \"integration-tests/aiguard/*.spec.js\"",
@@ -110,7 +112,7 @@
110
112
  "test:integration:plugins:coverage": "yarn services && node ./integration-tests/coverage/run-suite.js \"packages/datadog-plugin-@(${PLUGINS})/test/integration-test/**/${SPEC:-*}*.spec.js\"",
111
113
  "test:unit:plugins": "mocha \"packages/datadog-instrumentations/test/@(${PLUGINS}).spec.js\" \"packages/datadog-plugin-@(${PLUGINS})/test/**/*.spec.js\" --exclude \"packages/datadog-plugin-@(${PLUGINS})/test/integration-test/**/*.spec.js\"",
112
114
  "test:release": "mocha \"scripts/release/**/*.spec.js\"",
113
- "test:scripts": "mocha \"scripts/helpers/**/*.spec.js\" \"scripts/*.spec.mjs\"",
115
+ "test:scripts": "mocha \"benchmark/sirun/*.spec.js\" \"scripts/helpers/**/*.spec.js\" \"scripts/*.spec.mjs\"",
114
116
  "test:shimmer": "mocha \"packages/datadog-shimmer/test/**/*.spec.js\"",
115
117
  "test:shimmer:ci": "node scripts/c8-ci.js test:shimmer",
116
118
  "verify:workflow-job-names": "node scripts/verify-workflow-job-names.js",
@@ -185,13 +187,12 @@
185
187
  "opentracing": ">=0.14.7"
186
188
  },
187
189
  "optionalDependencies": {
188
- "@datadog/libdatadog": "0.9.4",
190
+ "@datadog/libdatadog": "0.12.1",
189
191
  "@datadog/native-appsec": "11.0.1",
190
192
  "@datadog/native-iast-taint-tracking": "4.2.0",
191
193
  "@datadog/native-metrics": "3.1.2",
192
- "@datadog/openfeature-node-server": "2.0.2",
193
- "@datadog/pprof": "5.17.0",
194
- "@datadog/wasm-js-rewriter": "5.0.1",
194
+ "@datadog/pprof": "5.18.0",
195
+ "@datadog/wasm-js-rewriter": "5.0.3",
195
196
  "@opentelemetry/api": ">=1.0.0 <1.10.0",
196
197
  "@opentelemetry/api-logs": "<1.0.0",
197
198
  "oxc-parser": "^0.132.0"
@@ -202,6 +203,8 @@
202
203
  "@babel/helpers": "^8.0.0",
203
204
  "@eslint/eslintrc": "^3.3.5",
204
205
  "@eslint/js": "^10.0.1",
206
+ "@eslint/plugin-kit": "^0.7.2",
207
+ "@datadog/openfeature-node-server": "2.1.0",
205
208
  "@msgpack/msgpack": "^3.1.3",
206
209
  "@openfeature/core": "^1.11.0",
207
210
  "@openfeature/server-sdk": "~1.22.0",
@@ -268,8 +271,8 @@
268
271
  },
269
272
  "depsUpdated": 1,
270
273
  "originalPackage": "dd-trace",
271
- "originalVersion": "6.10.0",
272
- "processedAt": "2026-08-08T00:22:44.943Z",
274
+ "originalVersion": "6.11.0",
275
+ "processedAt": "2026-08-18T00:15:49.193Z",
273
276
  "smokeTest": "passed"
274
277
  }
275
278
  }
@@ -8,11 +8,6 @@ const { pathToFileURL, fileURLToPath } = require('node:url')
8
8
  const instrumentations = require('../datadog-instrumentations/src/helpers/instrumentations')
9
9
  const extractPackageAndModulePath = require('../datadog-instrumentations/src/helpers/extract-package-and-module-path')
10
10
  const hooks = require('../datadog-instrumentations/src/helpers/hooks')
11
- const {
12
- OPTIONAL_PEER_FILTER,
13
- matchesOptionalPeerFile,
14
- rewriteOptionalPeerLoads,
15
- } = require('../datadog-instrumentations/src/helpers/optional-peer-bundler')
16
11
  const { processModule, isESMFile } = require('./src/utils')
17
12
  const log = require('./src/log')
18
13
 
@@ -133,19 +128,6 @@ module.exports.setup = function (build) {
133
128
  ${build.initialOptions.banner.js}`
134
129
  }
135
130
 
136
- // Keep the build from failing on the optional `@openfeature/core` peer of
137
- // `@openfeature/server-sdk` when it is not installed (#8635). esbuild follows the chain
138
- // whenever `@openfeature/server-sdk` is reachable -- the app importing it directly, or the
139
- // bundled provider when the optional peer is present -- so mark `@openfeature/core` external
140
- // when it is absent rather than erroring at bundle time.
141
- try {
142
- // eslint-disable-next-line n/no-unpublished-require
143
- require.resolve('@openfeature/core')
144
- } catch {
145
- build.initialOptions.external ??= []
146
- build.initialOptions.external.push('@openfeature/core')
147
- }
148
-
149
131
  const esmBuild = isESMBuild(build)
150
132
  if (
151
133
  esmBuild &&
@@ -182,22 +164,6 @@ ${build.initialOptions.banner.js}`
182
164
  log.warn('No git metadata available - skipping injection')
183
165
  }
184
166
 
185
- // Rewrite optional-peer loads so installed peers get bundled and survive the bundle being
186
- // relocated without them on disk (#8980). Registered before the generic onLoad so it wins for
187
- // these files. Absent peers stay opaque, so a build that does not opt into the feature does not
188
- // follow their dependency chain (#8635).
189
- build.onLoad({ filter: OPTIONAL_PEER_FILTER }, args => {
190
- const normalizedPath = args.path.replaceAll('\\', '/')
191
- if (!matchesOptionalPeerFile(normalizedPath)) return
192
-
193
- log.debug('INLINE: optional-peer loader applied to %s', normalizedPath)
194
- return {
195
- contents: rewriteOptionalPeerLoads(fs.readFileSync(args.path, 'utf8'), path.dirname(args.path)),
196
- loader: 'js',
197
- resolveDir: path.dirname(args.path),
198
- }
199
- })
200
-
201
167
  // first time is intercepted, proxy should be created, next time the original should be loaded
202
168
  const interceptedESMModules = new Set()
203
169