dd-trace 5.110.0 → 5.112.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 (164) hide show
  1. package/LICENSE-3rdparty.csv +1 -2
  2. package/README.md +13 -8
  3. package/ci/init.js +21 -2
  4. package/ci/vitest-no-worker-init-setup.mjs +430 -0
  5. package/ext/tags.js +2 -0
  6. package/index.d.ts +34 -1
  7. package/initialize.mjs +5 -6
  8. package/loader-hook.mjs +76 -55
  9. package/package.json +37 -34
  10. package/packages/datadog-instrumentations/src/ai.js +45 -0
  11. package/packages/datadog-instrumentations/src/apollo-server.js +5 -13
  12. package/packages/datadog-instrumentations/src/child_process.js +3 -3
  13. package/packages/datadog-instrumentations/src/claude-agent-sdk.js +587 -0
  14. package/packages/datadog-instrumentations/src/cucumber.js +102 -43
  15. package/packages/datadog-instrumentations/src/cypress-config.js +11 -3
  16. package/packages/datadog-instrumentations/src/fastify.js +27 -8
  17. package/packages/datadog-instrumentations/src/fs.js +8 -6
  18. package/packages/datadog-instrumentations/src/graphql.js +26 -495
  19. package/packages/datadog-instrumentations/src/helpers/hooks.js +1 -0
  20. package/packages/datadog-instrumentations/src/helpers/instrument.js +7 -0
  21. package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/ai.js +6 -6
  22. package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/claude-agent-sdk.js +17 -0
  23. package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/graphql.js +201 -0
  24. package/packages/datadog-instrumentations/src/helpers/rewriter/instrumentations/index.js +2 -0
  25. package/packages/datadog-instrumentations/src/jest.js +713 -63
  26. package/packages/datadog-instrumentations/src/mocha/main.js +24 -3
  27. package/packages/datadog-instrumentations/src/mocha/utils.js +128 -22
  28. package/packages/datadog-instrumentations/src/mocha/worker.js +13 -0
  29. package/packages/datadog-instrumentations/src/mongodb.js +74 -0
  30. package/packages/datadog-instrumentations/src/mongoose.js +13 -2
  31. package/packages/datadog-instrumentations/src/playwright.js +13 -9
  32. package/packages/datadog-instrumentations/src/vitest-main-no-worker-init.js +1297 -0
  33. package/packages/datadog-instrumentations/src/vitest-main.js +1594 -0
  34. package/packages/datadog-instrumentations/src/vitest-util.js +254 -0
  35. package/packages/datadog-instrumentations/src/vitest-worker.js +823 -0
  36. package/packages/datadog-instrumentations/src/vitest.js +11 -1855
  37. package/packages/datadog-plugin-ai/src/index.js +1 -1
  38. package/packages/datadog-plugin-ai/src/tracing.js +66 -3
  39. package/packages/datadog-plugin-ai/src/utils.js +17 -4
  40. package/packages/datadog-plugin-aws-durable-execution-sdk-js/src/client.js +2 -2
  41. package/packages/datadog-plugin-aws-durable-execution-sdk-js/src/context.js +19 -10
  42. package/packages/datadog-plugin-aws-durable-execution-sdk-js/src/handler.js +1 -0
  43. package/packages/datadog-plugin-aws-durable-execution-sdk-js/src/util.js +47 -11
  44. package/packages/datadog-plugin-child_process/src/index.js +13 -2
  45. package/packages/datadog-plugin-claude-agent-sdk/src/index.js +31 -0
  46. package/packages/datadog-plugin-claude-agent-sdk/src/tracing.js +107 -0
  47. package/packages/datadog-plugin-claude-agent-sdk/src/util.js +15 -0
  48. package/packages/datadog-plugin-cucumber/src/index.js +15 -24
  49. package/packages/datadog-plugin-cypress/src/cypress-plugin.js +360 -14
  50. package/packages/datadog-plugin-cypress/src/index.js +47 -2
  51. package/packages/datadog-plugin-cypress/src/plugin.js +1 -0
  52. package/packages/datadog-plugin-cypress/src/support.js +45 -1
  53. package/packages/datadog-plugin-express/src/code_origin.js +1 -1
  54. package/packages/datadog-plugin-fastify/src/code_origin.js +1 -1
  55. package/packages/datadog-plugin-graphql/src/execute.js +639 -12
  56. package/packages/datadog-plugin-graphql/src/index.js +37 -9
  57. package/packages/datadog-plugin-graphql/src/parse.js +24 -4
  58. package/packages/datadog-plugin-graphql/src/utils.js +9 -2
  59. package/packages/datadog-plugin-graphql/src/validate.js +17 -6
  60. package/packages/datadog-plugin-http/src/index.js +6 -8
  61. package/packages/datadog-plugin-jest/src/index.js +31 -15
  62. package/packages/datadog-plugin-mocha/src/index.js +40 -15
  63. package/packages/datadog-plugin-mongodb-core/src/bulk-write.js +43 -0
  64. package/packages/datadog-plugin-mongodb-core/src/index.js +8 -443
  65. package/packages/datadog-plugin-mongodb-core/src/query.js +452 -0
  66. package/packages/datadog-plugin-openai/src/services.js +2 -2
  67. package/packages/datadog-plugin-playwright/src/index.js +4 -3
  68. package/packages/datadog-plugin-vitest/src/index.js +120 -72
  69. package/packages/datadog-shimmer/src/shimmer.js +37 -16
  70. package/packages/dd-trace/src/aiguard/index.js +9 -14
  71. package/packages/dd-trace/src/aiguard/integrations/index.js +34 -0
  72. package/packages/dd-trace/src/aiguard/integrations/openai.js +47 -33
  73. package/packages/dd-trace/src/aiguard/integrations/vercel-ai.js +42 -28
  74. package/packages/dd-trace/src/aiguard/sdk.js +2 -2
  75. package/packages/dd-trace/src/appsec/api_security/sampler.js +3 -3
  76. package/packages/dd-trace/src/appsec/channels.js +3 -1
  77. package/packages/dd-trace/src/appsec/downstream_requests.js +4 -4
  78. package/packages/dd-trace/src/appsec/graphql.js +14 -11
  79. package/packages/dd-trace/src/appsec/iast/analyzers/nosql-injection-mongodb-analyzer.js +23 -23
  80. package/packages/dd-trace/src/appsec/iast/security-controls/index.js +2 -2
  81. package/packages/dd-trace/src/appsec/iast/telemetry/index.js +2 -1
  82. package/packages/dd-trace/src/appsec/index.js +10 -1
  83. package/packages/dd-trace/src/appsec/lambda.js +135 -0
  84. package/packages/dd-trace/src/appsec/reporter.js +49 -10
  85. package/packages/dd-trace/src/appsec/telemetry/index.js +1 -1
  86. package/packages/dd-trace/src/appsec/waf/index.js +16 -4
  87. package/packages/dd-trace/src/appsec/waf/waf_context_wrapper.js +4 -4
  88. package/packages/dd-trace/src/ci-visibility/dynamic-instrumentation/index.js +26 -1
  89. package/packages/dd-trace/src/ci-visibility/dynamic-instrumentation/worker/index.js +115 -24
  90. package/packages/dd-trace/src/ci-visibility/early-flake-detection/get-known-tests.js +21 -6
  91. package/packages/dd-trace/src/ci-visibility/exporters/agent-proxy/index.js +5 -2
  92. package/packages/dd-trace/src/ci-visibility/exporters/agentless/coverage-writer.js +1 -1
  93. package/packages/dd-trace/src/ci-visibility/exporters/agentless/di-logs-writer.js +1 -1
  94. package/packages/dd-trace/src/ci-visibility/exporters/agentless/index.js +6 -2
  95. package/packages/dd-trace/src/ci-visibility/exporters/agentless/writer.js +1 -1
  96. package/packages/dd-trace/src/ci-visibility/exporters/ci-visibility-exporter.js +130 -20
  97. package/packages/dd-trace/src/ci-visibility/exporters/git/git_metadata.js +2 -2
  98. package/packages/dd-trace/src/ci-visibility/exporters/test-worker/writer.js +17 -0
  99. package/packages/dd-trace/src/ci-visibility/intelligent-test-runner/get-skippable-suites.js +47 -26
  100. package/packages/dd-trace/src/ci-visibility/log-submission/log-submission-plugin.js +2 -2
  101. package/packages/dd-trace/src/ci-visibility/requests/get-library-configuration.js +64 -53
  102. package/packages/dd-trace/src/ci-visibility/requests/upload-coverage-report.js +3 -3
  103. package/packages/dd-trace/src/ci-visibility/requests/upload-test-screenshot.js +156 -0
  104. package/packages/dd-trace/src/ci-visibility/test-management/get-test-management-tests.js +23 -5
  105. package/packages/dd-trace/src/ci-visibility/test-optimization-http-cache-schema.js +128 -0
  106. package/packages/dd-trace/src/ci-visibility/test-optimization-http-cache.js +287 -0
  107. package/packages/dd-trace/src/config/defaults.js +3 -2
  108. package/packages/dd-trace/src/config/generated-config-types.d.ts +71 -57
  109. package/packages/dd-trace/src/config/helper.js +1 -0
  110. package/packages/dd-trace/src/config/index.js +35 -22
  111. package/packages/dd-trace/src/config/major-overrides.js +4 -2
  112. package/packages/dd-trace/src/config/remote_config.js +1 -1
  113. package/packages/dd-trace/src/config/supported-configurations.json +127 -56
  114. package/packages/dd-trace/src/constants.js +7 -0
  115. package/packages/dd-trace/src/crashtracking/crashtracker.js +2 -2
  116. package/packages/dd-trace/src/datastreams/processor.js +11 -3
  117. package/packages/dd-trace/src/exporters/agent/index.js +1 -1
  118. package/packages/dd-trace/src/exporters/agentless/writer.js +4 -4
  119. package/packages/dd-trace/src/llmobs/index.js +1 -1
  120. package/packages/dd-trace/src/llmobs/plugins/ai/ddTelemetry.js +403 -0
  121. package/packages/dd-trace/src/llmobs/plugins/ai/index.js +8 -395
  122. package/packages/dd-trace/src/llmobs/plugins/ai/util.js +27 -0
  123. package/packages/dd-trace/src/llmobs/plugins/ai/vercelTelemetry.js +363 -0
  124. package/packages/dd-trace/src/llmobs/plugins/base.js +4 -4
  125. package/packages/dd-trace/src/llmobs/plugins/claude-agent-sdk/index.js +270 -0
  126. package/packages/dd-trace/src/llmobs/plugins/claude-agent-sdk/utils.js +10 -0
  127. package/packages/dd-trace/src/llmobs/plugins/langgraph/index.js +1 -1
  128. package/packages/dd-trace/src/llmobs/sdk.js +3 -3
  129. package/packages/dd-trace/src/llmobs/span_processor.js +1 -1
  130. package/packages/dd-trace/src/llmobs/tagger.js +3 -3
  131. package/packages/dd-trace/src/llmobs/writers/base.js +1 -1
  132. package/packages/dd-trace/src/opentelemetry/metrics/index.js +54 -5
  133. package/packages/dd-trace/src/opentelemetry/metrics/otlp_span_stats_exporter.js +40 -0
  134. package/packages/dd-trace/src/opentelemetry/metrics/otlp_span_stats_transformer.js +169 -0
  135. package/packages/dd-trace/src/opentelemetry/otlp/otlp_http_exporter_base.js +38 -39
  136. package/packages/dd-trace/src/opentelemetry/span.js +5 -0
  137. package/packages/dd-trace/src/opentelemetry/trace/index.js +4 -0
  138. package/packages/dd-trace/src/opentelemetry/tracer_provider.js +1 -1
  139. package/packages/dd-trace/src/opentracing/tracer.js +6 -1
  140. package/packages/dd-trace/src/plugin_manager.js +23 -7
  141. package/packages/dd-trace/src/plugins/ci_plugin.js +159 -10
  142. package/packages/dd-trace/src/plugins/index.js +2 -0
  143. package/packages/dd-trace/src/plugins/util/llm.js +6 -1
  144. package/packages/dd-trace/src/plugins/util/test.js +15 -9
  145. package/packages/dd-trace/src/profiling/exporter_cli.js +2 -2
  146. package/packages/dd-trace/src/profiling/exporters/agent.js +28 -3
  147. package/packages/dd-trace/src/profiling/exporters/event_serializer.js +3 -3
  148. package/packages/dd-trace/src/profiling/profilers/wall.js +1 -1
  149. package/packages/dd-trace/src/proxy.js +8 -8
  150. package/packages/dd-trace/src/span_processor.js +5 -6
  151. package/packages/dd-trace/src/span_stats.js +96 -78
  152. package/packages/dd-trace/src/startup-log.js +2 -1
  153. package/packages/dd-trace/src/telemetry/dependencies.js +1 -1
  154. package/packages/dd-trace/src/telemetry/endpoints.js +6 -4
  155. package/packages/dd-trace/src/telemetry/index.js +2 -2
  156. package/packages/dd-trace/src/telemetry/logs/index.js +1 -1
  157. package/packages/dd-trace/src/telemetry/send-data.js +8 -8
  158. package/packages/dd-trace/src/telemetry/session-propagation.js +1 -1
  159. package/packages/dd-trace/src/telemetry/telemetry.js +9 -9
  160. package/vendor/dist/@datadog/sketches-js/index.js +1 -1
  161. package/vendor/dist/protobufjs/index.js +1 -1
  162. package/vendor/dist/protobufjs/minimal/index.js +1 -1
  163. package/vendor/dist/shell-quote/index.js +1 -1
  164. package/packages/datadog-plugin-graphql/src/resolve.js +0 -170
@@ -111,7 +111,6 @@
111
111
  "aliases": [
112
112
  "DATADOG_API_KEY"
113
113
  ],
114
- "internalPropertyName": "apiKey",
115
114
  "sensitive": true
116
115
  }
117
116
  ],
@@ -119,6 +118,7 @@
119
118
  {
120
119
  "implementation": "A",
121
120
  "type": "boolean",
121
+ "namespace": "appsec",
122
122
  "configurationNames": [
123
123
  "appsec.apiSecurity.enabled",
124
124
  "experimental.appsec.apiSecurity.enabled"
@@ -133,6 +133,7 @@
133
133
  {
134
134
  "implementation": "A",
135
135
  "type": "boolean",
136
+ "namespace": "appsec",
136
137
  "configurationNames": [
137
138
  "appsec.apiSecurity.endpointCollectionEnabled",
138
139
  "experimental.appsec.apiSecurity.endpointCollectionEnabled"
@@ -144,6 +145,7 @@
144
145
  {
145
146
  "implementation": "A",
146
147
  "type": "int",
148
+ "namespace": "appsec",
147
149
  "configurationNames": [
148
150
  "appsec.apiSecurity.endpointCollectionMessageLimit",
149
151
  "experimental.appsec.apiSecurity.endpointCollectionMessageLimit"
@@ -155,7 +157,7 @@
155
157
  {
156
158
  "implementation": "A",
157
159
  "type": "decimal",
158
- "internalPropertyName": "appsec.apiSecurity.downstreamBodyAnalysisSampleRate",
160
+ "namespace": "appsec",
159
161
  "default": "0.5"
160
162
  }
161
163
  ],
@@ -163,7 +165,7 @@
163
165
  {
164
166
  "implementation": "A",
165
167
  "type": "int",
166
- "internalPropertyName": "appsec.apiSecurity.maxDownstreamRequestBodyAnalysis",
168
+ "namespace": "appsec",
167
169
  "default": "1"
168
170
  }
169
171
  ],
@@ -171,7 +173,7 @@
171
173
  {
172
174
  "implementation": "A",
173
175
  "type": "int",
174
- "internalPropertyName": "appsec.apiSecurity.maxDownstreamBodyBytes",
176
+ "namespace": "appsec",
175
177
  "default": "10485760"
176
178
  }
177
179
  ],
@@ -180,7 +182,7 @@
180
182
  "implementation": "A",
181
183
  "type": "decimal",
182
184
  "default": "30",
183
- "internalPropertyName": "appsec.apiSecurity.sampleDelay"
185
+ "namespace": "appsec"
184
186
  }
185
187
  ],
186
188
  "DD_APM_FLUSH_DEADLINE_MILLISECONDS": [
@@ -392,7 +394,7 @@
392
394
  "implementation": "B",
393
395
  "type": "boolean",
394
396
  "default": null,
395
- "internalPropertyName": "appsec.sca.enabled"
397
+ "namespace": "appsec"
396
398
  }
397
399
  ],
398
400
  "DD_APPSEC_STACK_TRACE_ENABLED": [
@@ -447,7 +449,8 @@
447
449
  {
448
450
  "implementation": "A",
449
451
  "type": "boolean",
450
- "default": "false"
452
+ "default": "false",
453
+ "namespace": "testOptimization"
451
454
  }
452
455
  ],
453
456
  "DD_CIVISIBILITY_AGENTLESS_URL": [
@@ -455,28 +458,32 @@
455
458
  "implementation": "A",
456
459
  "type": "string",
457
460
  "transform": "toURL",
458
- "default": null
461
+ "default": null,
462
+ "namespace": "testOptimization"
459
463
  }
460
464
  ],
461
465
  "DD_CIVISIBILITY_AUTO_INSTRUMENTATION_PROVIDER": [
462
466
  {
463
467
  "implementation": "A",
464
468
  "type": "string",
465
- "default": null
469
+ "default": null,
470
+ "namespace": "testOptimization"
466
471
  }
467
472
  ],
468
473
  "DD_CIVISIBILITY_DANGEROUSLY_FORCE_COVERAGE": [
469
474
  {
470
475
  "implementation": "A",
471
476
  "type": "boolean",
472
- "default": "false"
477
+ "default": "false",
478
+ "namespace": "testOptimization"
473
479
  }
474
480
  ],
475
481
  "DD_CIVISIBILITY_DANGEROUSLY_FORCE_TEST_SKIPPING": [
476
482
  {
477
483
  "implementation": "A",
478
484
  "type": "boolean",
479
- "default": "false"
485
+ "default": "false",
486
+ "namespace": "testOptimization"
480
487
  }
481
488
  ],
482
489
  "DD_CIVISIBILITY_EARLY_FLAKE_DETECTION_ENABLED": [
@@ -484,14 +491,15 @@
484
491
  "implementation": "B",
485
492
  "type": "boolean",
486
493
  "default": "true",
487
- "internalPropertyName": "isEarlyFlakeDetectionEnabled"
494
+ "namespace": "testOptimization"
488
495
  }
489
496
  ],
490
497
  "DD_CIVISIBILITY_ENABLED": [
491
498
  {
492
499
  "implementation": "A",
493
500
  "type": "boolean",
494
- "default": "false"
501
+ "default": "false",
502
+ "namespace": "testOptimization"
495
503
  }
496
504
  ],
497
505
  "DD_CIVISIBILITY_FLAKY_RETRY_COUNT": [
@@ -499,7 +507,7 @@
499
507
  "implementation": "A",
500
508
  "type": "int",
501
509
  "default": "5",
502
- "internalPropertyName": "flakyTestRetriesCount"
510
+ "namespace": "testOptimization"
503
511
  }
504
512
  ],
505
513
  "DD_CIVISIBILITY_FLAKY_RETRY_ENABLED": [
@@ -507,14 +515,15 @@
507
515
  "implementation": "A",
508
516
  "type": "boolean",
509
517
  "default": "true",
510
- "internalPropertyName": "isFlakyTestRetriesEnabled"
518
+ "namespace": "testOptimization"
511
519
  }
512
520
  ],
513
521
  "DD_CIVISIBILITY_GIT_UNSHALLOW_ENABLED": [
514
522
  {
515
523
  "implementation": "A",
516
524
  "type": "boolean",
517
- "default": "true"
525
+ "default": "true",
526
+ "namespace": "testOptimization"
518
527
  }
519
528
  ],
520
529
  "DD_CIVISIBILITY_GIT_UPLOAD_ENABLED": [
@@ -522,7 +531,7 @@
522
531
  "implementation": "A",
523
532
  "type": "boolean",
524
533
  "default": "true",
525
- "internalPropertyName": "isGitUploadEnabled"
534
+ "namespace": "testOptimization"
526
535
  }
527
536
  ],
528
537
  "DD_CIVISIBILITY_IMPACTED_TESTS_DETECTION_ENABLED": [
@@ -530,7 +539,7 @@
530
539
  "implementation": "A",
531
540
  "type": "boolean",
532
541
  "default": "true",
533
- "internalPropertyName": "isImpactedTestsEnabled"
542
+ "namespace": "testOptimization"
534
543
  }
535
544
  ],
536
545
  "DD_CIVISIBILITY_ITR_ENABLED": [
@@ -538,7 +547,7 @@
538
547
  "implementation": "A",
539
548
  "type": "boolean",
540
549
  "default": "true",
541
- "internalPropertyName": "isIntelligentTestRunnerEnabled"
550
+ "namespace": "testOptimization"
542
551
  }
543
552
  ],
544
553
  "DD_ENABLE_LAGE_PACKAGE_NAME": [
@@ -552,35 +561,40 @@
552
561
  {
553
562
  "implementation": "A",
554
563
  "type": "boolean",
555
- "default": "true"
564
+ "default": "true",
565
+ "namespace": "testOptimization"
556
566
  }
557
567
  ],
558
568
  "DD_CIVISIBILITY_RUM_FLUSH_WAIT_MILLIS": [
559
569
  {
560
570
  "implementation": "A",
561
571
  "type": "int",
562
- "default": "500"
572
+ "default": "500",
573
+ "namespace": "testOptimization"
563
574
  }
564
575
  ],
565
576
  "DD_CIVISIBILITY_TEST_COMMAND": [
566
577
  {
567
578
  "implementation": "A",
568
579
  "type": "string",
569
- "default": null
580
+ "default": null,
581
+ "namespace": "testOptimization"
570
582
  }
571
583
  ],
572
584
  "DD_CIVISIBILITY_TEST_MODULE_ID": [
573
585
  {
574
586
  "implementation": "A",
575
587
  "type": "string",
576
- "default": null
588
+ "default": null,
589
+ "namespace": "testOptimization"
577
590
  }
578
591
  ],
579
592
  "DD_CIVISIBILITY_TEST_SESSION_ID": [
580
593
  {
581
594
  "implementation": "A",
582
595
  "type": "string",
583
- "default": null
596
+ "default": null,
597
+ "namespace": "testOptimization"
584
598
  }
585
599
  ],
586
600
  "DD_CODE_ORIGIN_FOR_SPANS_ENABLED": [
@@ -824,6 +838,13 @@
824
838
  "default": "false"
825
839
  }
826
840
  ],
841
+ "DD_EXPERIMENTAL_TEST_OPT_VITEST_NO_WORKER_INIT": [
842
+ {
843
+ "implementation": "A",
844
+ "type": "boolean",
845
+ "default": null
846
+ }
847
+ ],
827
848
  "DD_EXPERIMENTAL_TEST_REQUESTS_FS_CACHE": [
828
849
  {
829
850
  "implementation": "A",
@@ -1094,7 +1115,7 @@
1094
1115
  {
1095
1116
  "implementation": "B",
1096
1117
  "type": "string",
1097
- "internalPropertyName": "iast.securityControlsConfiguration",
1118
+ "namespace": "iast",
1098
1119
  "default": null
1099
1120
  }
1100
1121
  ],
@@ -1170,7 +1191,7 @@
1170
1191
  "aliases": [
1171
1192
  "DD_TRACE_TELEMETRY_ENABLED"
1172
1193
  ],
1173
- "internalPropertyName": "telemetry.enabled"
1194
+ "namespace": "telemetry"
1174
1195
  }
1175
1196
  ],
1176
1197
  "DD_INTERNAL_PROFILING_LONG_LIVED_THRESHOLD": [
@@ -1199,7 +1220,7 @@
1199
1220
  "implementation": "A",
1200
1221
  "type": "int",
1201
1222
  "default": "128",
1202
- "internalPropertyName": "langchain.spanCharLimit"
1223
+ "namespace": "langchain"
1203
1224
  }
1204
1225
  ],
1205
1226
  "DD_LANGCHAIN_SPAN_PROMPT_COMPLETION_SAMPLE_RATE": [
@@ -1207,7 +1228,7 @@
1207
1228
  "implementation": "A",
1208
1229
  "type": "decimal",
1209
1230
  "default": "1",
1210
- "internalPropertyName": "langchain.spanPromptCompletionSampleRate"
1231
+ "namespace": "langchain"
1211
1232
  }
1212
1233
  ],
1213
1234
  "DD_LLMOBS_AGENTLESS_ENABLED": [
@@ -1225,7 +1246,7 @@
1225
1246
  "implementation": "A",
1226
1247
  "type": "boolean",
1227
1248
  "default": "false",
1228
- "internalPropertyName": "llmobs.enabled"
1249
+ "namespace": "llmobs"
1229
1250
  }
1230
1251
  ],
1231
1252
  "DD_LLMOBS_ML_APP": [
@@ -1323,7 +1344,7 @@
1323
1344
  "implementation": "A",
1324
1345
  "type": "int",
1325
1346
  "default": "128",
1326
- "internalPropertyName": "openai.spanCharLimit"
1347
+ "namespace": "openai"
1327
1348
  }
1328
1349
  ],
1329
1350
  "DD_PIPELINE_EXECUTION_ID": [
@@ -1416,7 +1437,7 @@
1416
1437
  {
1417
1438
  "implementation": "B",
1418
1439
  "type": "string",
1419
- "internalPropertyName": "profiling.enabled",
1440
+ "namespace": "profiling",
1420
1441
  "configurationNames": [
1421
1442
  "profiling"
1422
1443
  ],
@@ -1578,7 +1599,7 @@
1578
1599
  "aliases": [
1579
1600
  "DD_REMOTE_CONFIG_ENABLED"
1580
1601
  ],
1581
- "internalPropertyName": "remoteConfig.enabled"
1602
+ "namespace": "remoteConfig"
1582
1603
  }
1583
1604
  ],
1584
1605
  "DD_REMOTE_CONFIG_POLL_INTERVAL_SECONDS": [
@@ -1740,7 +1761,7 @@
1740
1761
  "implementation": "A",
1741
1762
  "type": "boolean",
1742
1763
  "default": "false",
1743
- "internalPropertyName": "telemetry.debug"
1764
+ "namespace": "telemetry"
1744
1765
  }
1745
1766
  ],
1746
1767
  "DD_TELEMETRY_DEPENDENCY_COLLECTION_ENABLED": [
@@ -1748,7 +1769,7 @@
1748
1769
  "implementation": "A",
1749
1770
  "type": "boolean",
1750
1771
  "default": "true",
1751
- "internalPropertyName": "telemetry.dependencyCollection"
1772
+ "namespace": "telemetry"
1752
1773
  }
1753
1774
  ],
1754
1775
  "DD_TELEMETRY_FORWARDER_PATH": [
@@ -1763,7 +1784,7 @@
1763
1784
  "implementation": "A",
1764
1785
  "type": "int",
1765
1786
  "default": "86400",
1766
- "internalPropertyName": "telemetry.extendedHeartbeatInterval"
1787
+ "namespace": "telemetry"
1767
1788
  }
1768
1789
  ],
1769
1790
  "DD_TELEMETRY_HEARTBEAT_INTERVAL": [
@@ -1771,7 +1792,7 @@
1771
1792
  "implementation": "B",
1772
1793
  "type": "decimal",
1773
1794
  "default": "60.0",
1774
- "internalPropertyName": "telemetry.heartbeatInterval"
1795
+ "namespace": "telemetry"
1775
1796
  }
1776
1797
  ],
1777
1798
  "DD_TELEMETRY_LOG_COLLECTION_ENABLED": [
@@ -1779,7 +1800,7 @@
1779
1800
  "implementation": "A",
1780
1801
  "type": "boolean",
1781
1802
  "default": "true",
1782
- "internalPropertyName": "telemetry.logCollection"
1803
+ "namespace": "telemetry"
1783
1804
  }
1784
1805
  ],
1785
1806
  "DD_TELEMETRY_METRICS_ENABLED": [
@@ -1787,7 +1808,7 @@
1787
1808
  "implementation": "A",
1788
1809
  "type": "boolean",
1789
1810
  "default": "true",
1790
- "internalPropertyName": "telemetry.metrics"
1811
+ "namespace": "telemetry"
1791
1812
  }
1792
1813
  ],
1793
1814
  "DD_TEST_FAILED_TEST_REPLAY_ENABLED": [
@@ -1795,21 +1816,31 @@
1795
1816
  "implementation": "A",
1796
1817
  "type": "boolean",
1797
1818
  "default": "true",
1798
- "internalPropertyName": "isTestDynamicInstrumentationEnabled"
1819
+ "namespace": "testOptimization"
1820
+ }
1821
+ ],
1822
+ "DD_TEST_FAILURE_SCREENSHOTS_ENABLED": [
1823
+ {
1824
+ "implementation": "A",
1825
+ "type": "boolean",
1826
+ "default": null,
1827
+ "namespace": "testOptimization"
1799
1828
  }
1800
1829
  ],
1801
1830
  "DD_TEST_FLEET_CONFIG_PATH": [
1802
1831
  {
1803
1832
  "implementation": "A",
1804
1833
  "type": "string",
1805
- "default": null
1834
+ "default": null,
1835
+ "namespace": "testOptimization"
1806
1836
  }
1807
1837
  ],
1808
1838
  "DD_TEST_LOCAL_CONFIG_PATH": [
1809
1839
  {
1810
1840
  "implementation": "A",
1811
1841
  "type": "string",
1812
- "default": null
1842
+ "default": null,
1843
+ "namespace": "testOptimization"
1813
1844
  }
1814
1845
  ],
1815
1846
  "DD_TEST_MANAGEMENT_ATTEMPT_TO_FIX_RETRIES": [
@@ -1817,7 +1848,7 @@
1817
1848
  "implementation": "C",
1818
1849
  "type": "int",
1819
1850
  "default": "20",
1820
- "internalPropertyName": "testManagementAttemptToFixRetries"
1851
+ "namespace": "testOptimization"
1821
1852
  }
1822
1853
  ],
1823
1854
  "DD_TEST_MANAGEMENT_ENABLED": [
@@ -1825,7 +1856,7 @@
1825
1856
  "implementation": "A",
1826
1857
  "type": "boolean",
1827
1858
  "default": "true",
1828
- "internalPropertyName": "isTestManagementEnabled"
1859
+ "namespace": "testOptimization"
1829
1860
  }
1830
1861
  ],
1831
1862
  "DD_TEST_SESSION_NAME": [
@@ -1923,6 +1954,13 @@
1923
1954
  "default": "true"
1924
1955
  }
1925
1956
  ],
1957
+ "DD_TRACE_CLAUDE_AGENT_SDK_ENABLED": [
1958
+ {
1959
+ "implementation": "A",
1960
+ "type": "boolean",
1961
+ "default": "true"
1962
+ }
1963
+ ],
1926
1964
  "DD_TRACE_APOLLO_ENABLED": [
1927
1965
  {
1928
1966
  "implementation": "A",
@@ -2557,8 +2595,7 @@
2557
2595
  {
2558
2596
  "implementation": "A",
2559
2597
  "type": "boolean",
2560
- "default": "true",
2561
- "internalPropertyName": "tracing"
2598
+ "default": "true"
2562
2599
  }
2563
2600
  ],
2564
2601
  "DD_TRACE_ENCODING_DEBUG": [
@@ -2720,6 +2757,21 @@
2720
2757
  "default": "true"
2721
2758
  }
2722
2759
  ],
2760
+ "DD_TRACE_GRAPHQL_COLLAPSE": [
2761
+ {
2762
+ "implementation": "A",
2763
+ "type": "boolean",
2764
+ "default": "true"
2765
+ }
2766
+ ],
2767
+ "DD_TRACE_GRAPHQL_DEPTH": [
2768
+ {
2769
+ "implementation": "A",
2770
+ "type": "int",
2771
+ "default": "-1",
2772
+ "allowed": "-1|\\d+"
2773
+ }
2774
+ ],
2723
2775
  "DD_TRACE_GRAPHQL_ENABLED": [
2724
2776
  {
2725
2777
  "implementation": "A",
@@ -2755,6 +2807,13 @@
2755
2807
  "default": "true"
2756
2808
  }
2757
2809
  ],
2810
+ "DD_TRACE_GRAPHQL_VARIABLES": [
2811
+ {
2812
+ "implementation": "A",
2813
+ "type": "array",
2814
+ "default": ""
2815
+ }
2816
+ ],
2758
2817
  "DD_TRACE_GRAPHQL_YOGA_ENABLED": [
2759
2818
  {
2760
2819
  "implementation": "A",
@@ -3115,6 +3174,14 @@
3115
3174
  "default": "true"
3116
3175
  }
3117
3176
  ],
3177
+ "_DD_TRACE_METRICS_OTEL_FLUSH_INTERVAL": [
3178
+ {
3179
+ "implementation": "A",
3180
+ "type": "int",
3181
+ "default": "10000",
3182
+ "allowed": "[1-9]\\d*"
3183
+ }
3184
+ ],
3118
3185
  "DD_TRACE_MICROGATEWAY_CORE_ENABLED": [
3119
3186
  {
3120
3187
  "implementation": "A",
@@ -3292,8 +3359,7 @@
3292
3359
  {
3293
3360
  "implementation": "F",
3294
3361
  "type": "string",
3295
- "default": "(?:p(?:ass)?w(?:or)?d|pass(?:_?phrase)?|secret|(?:api_?|private_?|public_?|access_?|secret_?)key(?:_?id)?|token|consumer_?(?:id|key|secret)|sign(?:ed|ature)?|auth(?:entication|orization)?)(?:(?:\\s|%20)*(?:=|%3D)[^&]+|(?:\"|%22)(?:\\s|%20)*(?::|%3A)(?:\\s|%20)*(?:\"|%22)(?:%2[^2]|%[^2]|[^\"%])+(?:\"|%22))|bearer(?:\\s|%20)+[a-z0-9\\._\\-]+|token(?::|%3A)[a-z0-9]{13}|gh[opsu]_[0-9a-zA-Z]{36}|ey[I-L](?:[\\w=-]|%3D)+\\.ey[I-L](?:[\\w=-]|%3D)+(?:\\.(?:[\\w.+\\/=-]|%3D|%2F|%2B)+)?|[\\-]{5}BEGIN(?:[a-z\\s]|%20)+PRIVATE(?:\\s|%20)KEY[\\-]{5}[^\\-]+[\\-]{5}END(?:[a-z\\s]|%20)+PRIVATE(?:\\s|%20)KEY|ssh-rsa(?:\\s|%20)*(?:[a-z0-9\\/\\.+]|%2F|%5C|%2B){100,}",
3296
- "internalPropertyName": "queryStringObfuscation"
3362
+ "default": "(?:p(?:ass)?w(?:or)?d|pass(?:_?phrase)?|secret|(?:api_?|private_?|public_?|access_?|secret_?)key(?:_?id)?|token|consumer_?(?:id|key|secret)|sign(?:ed|ature)?|auth(?:entication|orization)?)(?:(?:\\s|%20)*(?:=|%3D)[^&]+|(?:\"|%22)(?:\\s|%20)*(?::|%3A)(?:\\s|%20)*(?:\"|%22)(?:%2[^2]|%[^2]|[^\"%])+(?:\"|%22))|bearer(?:\\s|%20)+[a-z0-9\\._\\-]+|token(?::|%3A)[a-z0-9]{13}|gh[opsu]_[0-9a-zA-Z]{36}|ey[I-L](?:[\\w=-]|%3D)+\\.ey[I-L](?:[\\w=-]|%3D)+(?:\\.(?:[\\w.+\\/=-]|%3D|%2F|%2B)+)?|[\\-]{5}BEGIN(?:[a-z\\s]|%20)+PRIVATE(?:\\s|%20)KEY[\\-]{5}[^\\-]+[\\-]{5}END(?:[a-z\\s]|%20)+PRIVATE(?:\\s|%20)KEY|ssh-rsa(?:\\s|%20)*(?:[a-z0-9\\/\\.+]|%2F|%5C|%2B){100,}"
3297
3363
  }
3298
3364
  ],
3299
3365
  "DD_TRACE_OPENAI_ENABLED": [
@@ -3331,14 +3397,14 @@
3331
3397
  "default": "true"
3332
3398
  }
3333
3399
  ],
3334
- "DD_TRACE_OTEL_SEMANTICS_ENABLED": [
3400
+ "DD_TRACE_OTEL_ENABLED": [
3335
3401
  {
3336
3402
  "implementation": "A",
3337
3403
  "type": "boolean",
3338
3404
  "default": "false"
3339
3405
  }
3340
3406
  ],
3341
- "DD_TRACE_OTEL_ENABLED": [
3407
+ "DD_TRACE_OTEL_SEMANTICS_ENABLED": [
3342
3408
  {
3343
3409
  "implementation": "A",
3344
3410
  "type": "boolean",
@@ -3633,8 +3699,7 @@
3633
3699
  {
3634
3700
  "implementation": "A",
3635
3701
  "type": "boolean",
3636
- "default": "false",
3637
- "internalPropertyName": "resourceRenamingEnabled"
3702
+ "default": "false"
3638
3703
  }
3639
3704
  ],
3640
3705
  "DD_TRACE_RESTIFY_ENABLED": [
@@ -3685,8 +3750,7 @@
3685
3750
  {
3686
3751
  "implementation": "A",
3687
3752
  "type": "string",
3688
- "default": null,
3689
- "internalPropertyName": "scope"
3753
+ "default": null
3690
3754
  }
3691
3755
  ],
3692
3756
  "DD_TRACE_SELENIUM_ENABLED": [
@@ -3764,7 +3828,7 @@
3764
3828
  {
3765
3829
  "implementation": "A",
3766
3830
  "type": "boolean",
3767
- "internalPropertyName": "stats.enabled",
3831
+ "namespace": "stats",
3768
3832
  "configurationNames": [
3769
3833
  "stats"
3770
3834
  ],
@@ -3910,7 +3974,7 @@
3910
3974
  "implementation": "A",
3911
3975
  "type": "int",
3912
3976
  "default": "128",
3913
- "internalPropertyName": "vertexai.spanCharLimit"
3977
+ "namespace": "vertexai"
3914
3978
  }
3915
3979
  ],
3916
3980
  "DD_VERTEXAI_SPAN_PROMPT_COMPLETION_SAMPLE_RATE": [
@@ -3918,7 +3982,7 @@
3918
3982
  "implementation": "A",
3919
3983
  "type": "decimal",
3920
3984
  "default": "1",
3921
- "internalPropertyName": "vertexai.spanPromptCompletionSampleRate"
3985
+ "namespace": "vertexai"
3922
3986
  }
3923
3987
  ],
3924
3988
  "DD_VITEST_WORKER": [
@@ -4182,6 +4246,13 @@
4182
4246
  "default": null,
4183
4247
  "allowed": "\\d+(\\.\\d+)?"
4184
4248
  }
4249
+ ],
4250
+ "OTEL_TRACES_SPAN_METRICS_ENABLED": [
4251
+ {
4252
+ "implementation": "A",
4253
+ "type": "boolean",
4254
+ "default": null
4255
+ }
4185
4256
  ]
4186
4257
  }
4187
4258
  }
@@ -61,4 +61,11 @@ module.exports = {
61
61
  UPSTREAM: 'span-pointer-up',
62
62
  DOWNSTREAM: 'span-pointer-down',
63
63
  }),
64
+ // https://github.com/grpc/grpc/blob/master/doc/statuscodes.md
65
+ GRPC_STATUS_NAMES: [
66
+ 'OK', 'CANCELLED', 'UNKNOWN', 'INVALID_ARGUMENT', 'DEADLINE_EXCEEDED',
67
+ 'NOT_FOUND', 'ALREADY_EXISTS', 'PERMISSION_DENIED', 'RESOURCE_EXHAUSTED',
68
+ 'FAILED_PRECONDITION', 'ABORTED', 'OUT_OF_RANGE', 'UNIMPLEMENTED',
69
+ 'INTERNAL', 'UNAVAILABLE', 'DATA_LOSS', 'UNAUTHENTICATED',
70
+ ],
64
71
  }
@@ -1,6 +1,6 @@
1
1
  'use strict'
2
2
 
3
- const { EOL } = require('node:os')
3
+ const { EOL, platform } = require('node:os')
4
4
 
5
5
  // Load binding first to not import other modules if it throws
6
6
  const libdatadog = require('@datadog/libdatadog')
@@ -71,7 +71,7 @@ class Crashtracker {
71
71
 
72
72
  // Out-of-process symbolication currently works on
73
73
  // Linux only, does not work on Mac.
74
- const resolveMode = require('os').platform === 'linux'
74
+ const resolveMode = platform() === 'linux'
75
75
  ? 'EnabledWithSymbolsInReceiver'
76
76
  : 'EnabledWithInprocessSymbols'
77
77
 
@@ -235,7 +235,11 @@ class DataStreamsProcessor {
235
235
  this._schemaSamplers = {}
236
236
  this._checkpointRegistry = new CheckpointRegistry()
237
237
 
238
- if (this.enabled) {
238
+ // `flushInterval === 0` is the "flush on write" sentinel the trace exporter already honors
239
+ // (agent exporter `export()`); a background timer of `0` would instead fire on every event-loop
240
+ // tick, decoupled from when checkpoints are recorded, and a single tick landing while the agent
241
+ // is unreachable drops the bucket for good (it is cleared on serialize). Push on record instead.
242
+ if (this.enabled && flushInterval !== 0) {
239
243
  this.timer = setInterval(this.onInterval.bind(this), flushInterval)
240
244
  this.timer.unref?.()
241
245
  }
@@ -282,6 +286,7 @@ class DataStreamsProcessor {
282
286
  // StatsPoint already converted the 8-byte Buffer hash to a uint64 BigInt.
283
287
  span.setTag(PATHWAY_HASH, statsPoint.hash.toString())
284
288
  }
289
+ if (this.flushInterval === 0) this.onInterval()
285
290
  }
286
291
 
287
292
  setCheckpoint (edgeTags, span, ctx, payloadSize = 0) {
@@ -356,8 +361,9 @@ class DataStreamsProcessor {
356
361
 
357
362
  recordOffset ({ timestamp, ...backlogData }) {
358
363
  if (!this.enabled) return
359
- return this.bucketFromTimestamp(timestamp)
360
- .forBacklog(backlogData)
364
+ const backlog = this.bucketFromTimestamp(timestamp).forBacklog(backlogData)
365
+ if (this.flushInterval === 0) this.onInterval()
366
+ return backlog
361
367
  }
362
368
 
363
369
  setOffset (offsetObj) {
@@ -401,6 +407,8 @@ class DataStreamsProcessor {
401
407
  // Number() cast is safe here: 10s bucket granularity tolerates ~0.5ns precision loss
402
408
  this.bucketFromTimestamp(Number(timestampNs)).addTransaction(entry)
403
409
 
410
+ if (this.flushInterval === 0) this.onInterval()
411
+
404
412
  if (span) {
405
413
  span.setTag(DSM_TRANSACTION_ID, transactionId)
406
414
  span.setTag(DSM_TRANSACTION_CHECKPOINT, checkpointName)
@@ -13,7 +13,7 @@ class AgentExporter {
13
13
  this._url = config.url
14
14
 
15
15
  const headers = {}
16
- if (stats.enabled || apmTracingEnabled === false) {
16
+ if (stats.DD_TRACE_STATS_COMPUTATION_ENABLED || apmTracingEnabled === false) {
17
17
  headers['Datadog-Client-Computed-Stats'] = 'yes'
18
18
  }
19
19