dd-trace 6.0.0-pre-442b2e5 → 6.0.0-pre-a99e5ea

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 (99) hide show
  1. package/README.md +8 -99
  2. package/ci/cypress/after-run.js +1 -0
  3. package/ci/cypress/after-spec.js +1 -0
  4. package/index.d.ts +1516 -1486
  5. package/package.json +4 -4
  6. package/packages/datadog-core/src/utils/src/get.js +11 -0
  7. package/packages/datadog-core/src/utils/src/has.js +14 -0
  8. package/packages/datadog-core/src/utils/src/set.js +16 -0
  9. package/packages/datadog-instrumentations/src/amqplib.js +1 -1
  10. package/packages/datadog-instrumentations/src/apollo.js +101 -0
  11. package/packages/datadog-instrumentations/src/cucumber.js +157 -42
  12. package/packages/datadog-instrumentations/src/grpc/server.js +3 -1
  13. package/packages/datadog-instrumentations/src/helpers/hooks.js +1 -0
  14. package/packages/datadog-instrumentations/src/jest.js +80 -40
  15. package/packages/datadog-instrumentations/src/mocha.js +4 -1
  16. package/packages/datadog-instrumentations/src/mongodb-core.js +34 -3
  17. package/packages/datadog-instrumentations/src/playwright.js +78 -16
  18. package/packages/datadog-plugin-amqplib/src/consumer.js +8 -4
  19. package/packages/datadog-plugin-amqplib/src/producer.js +3 -4
  20. package/packages/datadog-plugin-apollo/src/gateway/execute.js +12 -0
  21. package/packages/datadog-plugin-apollo/src/gateway/fetch.js +36 -0
  22. package/packages/datadog-plugin-apollo/src/gateway/index.js +36 -0
  23. package/packages/datadog-plugin-apollo/src/gateway/plan.js +13 -0
  24. package/packages/datadog-plugin-apollo/src/gateway/postprocessing.js +12 -0
  25. package/packages/datadog-plugin-apollo/src/gateway/request.js +139 -0
  26. package/packages/datadog-plugin-apollo/src/gateway/validate.js +21 -0
  27. package/packages/datadog-plugin-apollo/src/index.js +15 -0
  28. package/packages/datadog-plugin-aws-sdk/src/base.js +3 -2
  29. package/packages/datadog-plugin-aws-sdk/src/services/kinesis.js +60 -57
  30. package/packages/datadog-plugin-aws-sdk/src/services/sns.js +42 -22
  31. package/packages/datadog-plugin-aws-sdk/src/services/sqs.js +64 -30
  32. package/packages/datadog-plugin-cucumber/src/index.js +25 -9
  33. package/packages/datadog-plugin-cypress/src/after-run.js +3 -0
  34. package/packages/datadog-plugin-cypress/src/after-spec.js +3 -0
  35. package/packages/datadog-plugin-cypress/src/cypress-plugin.js +625 -0
  36. package/packages/datadog-plugin-cypress/src/plugin.js +6 -549
  37. package/packages/datadog-plugin-cypress/src/support.js +50 -3
  38. package/packages/datadog-plugin-graphql/src/index.js +1 -1
  39. package/packages/datadog-plugin-graphql/src/resolve.js +10 -8
  40. package/packages/datadog-plugin-grpc/src/util.js +1 -1
  41. package/packages/datadog-plugin-jest/src/index.js +13 -4
  42. package/packages/datadog-plugin-kafkajs/src/consumer.js +4 -3
  43. package/packages/datadog-plugin-kafkajs/src/producer.js +3 -5
  44. package/packages/datadog-plugin-mocha/src/index.js +2 -2
  45. package/packages/datadog-plugin-playwright/src/index.js +34 -3
  46. package/packages/datadog-plugin-rhea/src/consumer.js +8 -3
  47. package/packages/datadog-plugin-rhea/src/producer.js +3 -4
  48. package/packages/dd-trace/src/appsec/iast/iast-plugin.js +23 -12
  49. package/packages/dd-trace/src/appsec/iast/index.js +10 -0
  50. package/packages/dd-trace/src/appsec/iast/path-line.js +9 -6
  51. package/packages/dd-trace/src/appsec/iast/taint-tracking/operations.js +1 -1
  52. package/packages/dd-trace/src/appsec/iast/taint-tracking/plugin.js +6 -2
  53. package/packages/dd-trace/src/appsec/iast/taint-tracking/rewriter-telemetry.js +1 -1
  54. package/packages/dd-trace/src/appsec/iast/taint-tracking/rewriter.js +14 -2
  55. package/packages/dd-trace/src/appsec/iast/taint-tracking/taint-tracking-impl.js +1 -1
  56. package/packages/dd-trace/src/appsec/iast/telemetry/iast-metric.js +34 -27
  57. package/packages/dd-trace/src/appsec/iast/telemetry/namespaces.js +39 -11
  58. package/packages/dd-trace/src/appsec/iast/telemetry/span-tags.js +7 -6
  59. package/packages/dd-trace/src/appsec/recommended.json +67 -27
  60. package/packages/dd-trace/src/appsec/remote_config/index.js +1 -1
  61. package/packages/dd-trace/src/appsec/reporter.js +24 -11
  62. package/packages/dd-trace/src/ci-visibility/early-flake-detection/get-known-tests.js +1 -3
  63. package/packages/dd-trace/src/ci-visibility/exporters/agent-proxy/index.js +6 -1
  64. package/packages/dd-trace/src/config.js +451 -459
  65. package/packages/dd-trace/src/data_streams_context.js +1 -1
  66. package/packages/dd-trace/src/datastreams/pathway.js +58 -1
  67. package/packages/dd-trace/src/datastreams/processor.js +3 -5
  68. package/packages/dd-trace/src/format.js +0 -1
  69. package/packages/dd-trace/src/lambda/runtime/ritm.js +1 -1
  70. package/packages/dd-trace/src/opentracing/propagation/text_map.js +23 -4
  71. package/packages/dd-trace/src/opentracing/span.js +6 -4
  72. package/packages/dd-trace/src/opentracing/span_context.js +1 -0
  73. package/packages/dd-trace/src/plugins/apollo.js +50 -0
  74. package/packages/dd-trace/src/plugins/composite.js +1 -0
  75. package/packages/dd-trace/src/plugins/index.js +1 -0
  76. package/packages/dd-trace/src/plugins/tracing.js +6 -2
  77. package/packages/dd-trace/src/plugins/util/test.js +4 -2
  78. package/packages/dd-trace/src/plugins/util/web.js +1 -1
  79. package/packages/dd-trace/src/profiling/exporters/agent.js +77 -32
  80. package/packages/dd-trace/src/service-naming/schemas/v0/web.js +24 -0
  81. package/packages/dd-trace/src/service-naming/schemas/v1/web.js +24 -0
  82. package/packages/dd-trace/src/telemetry/index.js +35 -33
  83. package/packages/dd-trace/src/telemetry/logs/index.js +2 -2
  84. package/packages/dd-trace/src/tracer.js +3 -3
  85. package/register.js +4 -0
  86. package/CONTRIBUTING.md +0 -73
  87. package/MIGRATING.md +0 -224
  88. package/packages/dd-trace/src/external-logger/test/index.spec.js +0 -147
  89. package/scripts/check-proposal-labels.js +0 -71
  90. package/scripts/check_licenses.js +0 -69
  91. package/scripts/helpers/color.js +0 -8
  92. package/scripts/helpers/exec.js +0 -22
  93. package/scripts/helpers/title.js +0 -15
  94. package/scripts/install_plugin_modules.js +0 -248
  95. package/scripts/publish_docs.js +0 -21
  96. package/scripts/st.js +0 -105
  97. /package/packages/{utils → datadog-core/src/utils}/src/kebabcase.js +0 -0
  98. /package/packages/{utils → datadog-core/src/utils}/src/pick.js +0 -0
  99. /package/packages/{utils → datadog-core/src/utils}/src/uniq.js +0 -0
package/README.md CHANGED
@@ -62,95 +62,12 @@ For more information about library versioning and compatibility, see the [NodeJS
62
62
  Changes associated with each individual release are documented on the [GitHub Releases](https://github.com/DataDog/dd-trace-js/releases) screen.
63
63
 
64
64
 
65
- ## Development
65
+ ## Development and Contribution
66
66
 
67
- Before contributing to this open source project, read our [CONTRIBUTING.md](https://github.com/DataDog/dd-trace-js/blob/master/CONTRIBUTING.md).
67
+ Please read the [CONTRIBUTING.md](https://github.com/DataDog/dd-trace-js/blob/master/CONTRIBUTING.md) document before contributing to this open source project.
68
68
 
69
69
 
70
- ## Requirements
71
-
72
- Since this project supports multiple Node versions, using a version
73
- manager such as [nvm](https://github.com/creationix/nvm) is recommended.
74
-
75
- We use [yarn](https://yarnpkg.com/) for its workspace functionality, so make sure to install that as well.
76
-
77
- To install dependencies once you have Node and yarn installed, run:
78
-
79
- ```sh
80
- $ yarn
81
- ```
82
-
83
-
84
- ## Testing
85
-
86
- Before running _plugin_ tests, the data stores need to be running.
87
- The easiest way to start all of them is to use the provided
88
- docker-compose configuration:
89
-
90
- ```sh
91
- $ docker-compose up -d -V --remove-orphans --force-recreate
92
- $ yarn services
93
- ```
94
-
95
- > **Note**
96
- > The `couchbase`, `grpc` and `oracledb` instrumentations rely on native modules
97
- > that do not compile on ARM64 devices (for example M1/M2 Mac) - their tests
98
- > cannot be run locally on these devices.
99
-
100
- ### Unit Tests
101
-
102
- There are several types of unit tests, for various types of components. The
103
- following commands may be useful:
104
-
105
- ```sh
106
- # Tracer core tests (i.e. testing `packages/dd-trace`)
107
- $ yarn test:trace:core
108
- # "Core" library tests (i.e. testing `packages/datadog-core`
109
- $ yarn test:core
110
- # Instrumentations tests (i.e. testing `packages/datadog-instrumentations`
111
- $ yarn test:instrumentations
112
- ```
113
-
114
- Several other components have test commands as well. See `package.json` for
115
- details.
116
-
117
- To test _plugins_ (i.e. components in `packages/datadog-plugin-XXXX`
118
- directories, set the `PLUGINS` environment variable to the plugin you're
119
- interested in, and use `yarn test:plugins`. If you need to test multiple
120
- plugins you may separate then with a pipe (`|`) delimiter. Here's an
121
- example testing the `express` and `bluebird` plugins:
122
-
123
- ```sh
124
- PLUGINS="express|bluebird" yarn test:plugins
125
- ```
126
-
127
-
128
- ### Memory Leaks
129
-
130
- To run the memory leak tests, use:
131
-
132
- ```sh
133
- $ yarn leak:core
134
-
135
- # or
136
-
137
- $ yarn leak:plugins
138
- ```
139
-
140
-
141
- ### Linting
142
-
143
- We use [ESLint](https://eslint.org) to make sure that new code
144
- conforms to our coding standards.
145
-
146
- To run the linter, use:
147
-
148
- ```sh
149
- $ yarn lint
150
- ```
151
-
152
-
153
- ### Experimental ESM Support
70
+ ## Experimental ESM Support
154
71
 
155
72
  > **Warning**
156
73
  >
@@ -163,26 +80,18 @@ but code loaded using `import` might not always work.
163
80
 
164
81
  Use the following command to enable experimental ESM support with your application:
165
82
 
83
+ Node.js < v20.6
84
+
166
85
  ```sh
167
86
  node --loader dd-trace/loader-hook.mjs entrypoint.js
168
87
  ```
169
88
 
170
-
171
- ### Benchmarks
172
-
173
- Our microbenchmarks live in `benchmark/sirun`. Each directory in there
174
- corresponds to a specific benchmark test and its variants, which are used to
175
- track regressions and improvements over time.
176
-
177
- In addition to those, when two or more approaches must be compared, please write
178
- a benchmark in the `benchmark/index.js` module so that we can keep track of the
179
- most efficient algorithm. To run your benchmark, use:
89
+ Node.js >= v20.6
180
90
 
181
91
  ```sh
182
- $ yarn bench
92
+ node --import dd-trace/register.js entrypoint.js
183
93
  ```
184
94
 
185
-
186
95
  ## Serverless / Lambda
187
96
 
188
97
  Note that there is a separate Lambda project, [datadog-lambda-js](https://github.com/DataDog/datadog-lambda-js), that is responsible for enabling metrics and distributed tracing when your application runs on Lambda.
@@ -199,4 +108,4 @@ If you would like to trace your bundled application then please read this page o
199
108
 
200
109
  ## Security Vulnerabilities
201
110
 
202
- If you have found a security issue, please contact the security team directly at [security@datadoghq.com](mailto:security@datadoghq.com).
111
+ Please refer to the [SECURITY.md](https://github.com/DataDog/dd-trace-js/blob/master/SECURITY.md) document if you have found a security issue.
@@ -0,0 +1 @@
1
+ module.exports = require('../../packages/datadog-plugin-cypress/src/after-run')
@@ -0,0 +1 @@
1
+ module.exports = require('../../packages/datadog-plugin-cypress/src/after-spec')