dd-trace 4.30.0 → 4.31.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 (36) hide show
  1. package/index.d.ts +4 -0
  2. package/package.json +2 -2
  3. package/packages/datadog-plugin-cucumber/src/index.js +2 -2
  4. package/packages/datadog-plugin-cypress/src/cypress-plugin.js +2 -2
  5. package/packages/datadog-plugin-jest/src/index.js +2 -2
  6. package/packages/datadog-plugin-mocha/src/index.js +2 -2
  7. package/packages/dd-trace/src/appsec/iast/iast-plugin.js +23 -12
  8. package/packages/dd-trace/src/appsec/iast/path-line.js +9 -6
  9. package/packages/dd-trace/src/appsec/iast/taint-tracking/operations.js +1 -1
  10. package/packages/dd-trace/src/appsec/iast/taint-tracking/plugin.js +6 -2
  11. package/packages/dd-trace/src/appsec/iast/taint-tracking/rewriter-telemetry.js +1 -1
  12. package/packages/dd-trace/src/appsec/iast/taint-tracking/rewriter.js +6 -7
  13. package/packages/dd-trace/src/appsec/iast/taint-tracking/taint-tracking-impl.js +1 -1
  14. package/packages/dd-trace/src/appsec/iast/telemetry/iast-metric.js +34 -27
  15. package/packages/dd-trace/src/appsec/iast/telemetry/namespaces.js +39 -11
  16. package/packages/dd-trace/src/appsec/iast/telemetry/span-tags.js +7 -6
  17. package/packages/dd-trace/src/appsec/reporter.js +24 -11
  18. package/packages/dd-trace/src/ci-visibility/exporters/agent-proxy/index.js +6 -1
  19. package/packages/dd-trace/src/lambda/runtime/ritm.js +1 -1
  20. package/packages/dd-trace/src/opentracing/propagation/text_map.js +21 -2
  21. package/packages/dd-trace/src/opentracing/span.js +2 -0
  22. package/packages/dd-trace/src/opentracing/span_context.js +1 -0
  23. package/packages/dd-trace/src/plugins/util/test.js +2 -2
  24. package/packages/dd-trace/src/priority_sampler.js +11 -6
  25. package/packages/dd-trace/src/telemetry/index.js +15 -4
  26. package/CONTRIBUTING.md +0 -171
  27. package/MIGRATING.md +0 -224
  28. package/packages/dd-trace/src/external-logger/test/index.spec.js +0 -147
  29. package/scripts/check-proposal-labels.js +0 -71
  30. package/scripts/check_licenses.js +0 -69
  31. package/scripts/helpers/color.js +0 -8
  32. package/scripts/helpers/exec.js +0 -22
  33. package/scripts/helpers/title.js +0 -15
  34. package/scripts/install_plugin_modules.js +0 -248
  35. package/scripts/publish_docs.js +0 -21
  36. package/scripts/st.js +0 -105
package/scripts/st.js DELETED
@@ -1,105 +0,0 @@
1
- #!/usr/bin/env node
2
- /* eslint-disable no-console, no-fallthrough */
3
- 'use strict'
4
-
5
- const path = require('path')
6
- const { writeFileSync } = require('fs')
7
- const { execSync } = require('child_process')
8
-
9
- const ddtracePath = path.join(__dirname, '..')
10
- const defaultTestPath = process.env.DD_ST_PATH || path.join(ddtracePath, '..', 'system-tests')
11
-
12
- const { buildAll, npm, testDir, testArgs } = parseArgs()
13
-
14
- const binariesPath = path.join(testDir, 'binaries')
15
-
16
- if (npm) {
17
- console.log('Using NPM package:', npm)
18
-
19
- writeFileSync(path.join(binariesPath, 'nodejs-load-from-npm'), npm)
20
- } else {
21
- console.log('Using local repo')
22
-
23
- const packName = execSync(`npm pack ${ddtracePath}`, {
24
- cwd: binariesPath,
25
- stdio: [null, null, 'inherit'],
26
- encoding: 'utf8'
27
- }).slice(0, -1) // remove trailing newline
28
-
29
- writeFileSync(path.join(binariesPath, 'nodejs-load-from-npm'), `/binaries/${packName}`)
30
- }
31
-
32
- try {
33
- execSync(`./build.sh ${buildAll ? '' : '-i weblog'} && ./run.sh ${testArgs}`, {
34
- cwd: testDir,
35
- stdio: [null, 'inherit', 'inherit']
36
- })
37
- } catch (err) {
38
- process.exit(err.status || 1)
39
- }
40
-
41
- function parseArgs () {
42
- const args = {
43
- buildAll: false,
44
- npm: null,
45
- testDir: defaultTestPath,
46
- testArgs: ''
47
- }
48
-
49
- for (let i = 2; i < process.argv.length; i++) {
50
- switch (process.argv[i]) {
51
- case '-b':
52
- case '--build-all':
53
- args.buildAll = true
54
- break
55
-
56
- case '-h':
57
- case '--help':
58
- helpAndExit()
59
- break
60
-
61
- case '-n':
62
- case '--npm': {
63
- const arg = process.argv[i + 1]
64
- if (!arg || arg[0] === '-') {
65
- args.npm = 'dd-trace'
66
- } else {
67
- args.npm = arg
68
- i++
69
- }
70
- break
71
- }
72
-
73
- case '-t':
74
- case '--test-dir': {
75
- const arg = process.argv[++i]
76
- if (!arg || arg[0] === '-') helpAndExit()
77
- args.testDir = arg
78
- break
79
- }
80
-
81
- case '--':
82
- args.testArgs = process.argv.slice(i + 1).join(' ')
83
- return args
84
-
85
- default:
86
- console.log('Unknown option:', process.argv[i], '\n')
87
- helpAndExit()
88
- }
89
- }
90
-
91
- return args
92
- }
93
-
94
- function helpAndExit () {
95
- console.log('Usage: node st.js [options...] [-- test-args]')
96
- console.log('Options:')
97
- console.log(' -b, --build-all Rebuild all images (default: only build weblog)')
98
- console.log(' -h, --help Print this message')
99
- console.log(' -n, --npm [package] Build a remote package instead of the local repo (default: "dd-trace")')
100
- console.log(' Can be a package name (e.g. "dd-trace@4.2.0") or a git URL (e.g.')
101
- console.log(' "git+https://github.com/DataDog/dd-trace-js.git#mybranch")')
102
- console.log(' -t, --test-dir <path> Specify the system-tests directory (default: "dd-trace/../system-tests/")')
103
- console.log(' -- <test-args> Passed to system-tests run.sh (e.g. "-- SCENARIO_NAME tests/path_to_test.py")')
104
- process.exit()
105
- }