dd-trace 5.82.0 → 5.83.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.
- package/LICENSE-3rdparty.csv +78 -79
- package/ci/init.js +6 -6
- package/index.d.ts +152 -3
- package/loader-hook.mjs +1 -1
- package/package.json +58 -55
- package/packages/datadog-core/src/storage.js +7 -7
- package/packages/datadog-esbuild/index.js +6 -0
- package/packages/datadog-instrumentations/src/ai.js +7 -3
- package/packages/datadog-instrumentations/src/child_process.js +1 -1
- package/packages/datadog-instrumentations/src/cucumber.js +1 -1
- package/packages/datadog-instrumentations/src/graphql.js +1 -1
- package/packages/datadog-instrumentations/src/helpers/instrumentations.js +4 -3
- package/packages/datadog-instrumentations/src/helpers/register.js +3 -7
- package/packages/datadog-instrumentations/src/helpers/rewriter/index.js +1 -1
- package/packages/datadog-instrumentations/src/http/client.js +2 -2
- package/packages/datadog-instrumentations/src/jest.js +35 -14
- package/packages/datadog-instrumentations/src/koa.js +2 -1
- package/packages/datadog-instrumentations/src/light-my-request.js +2 -2
- package/packages/datadog-instrumentations/src/mocha/main.js +2 -2
- package/packages/datadog-instrumentations/src/mocha/worker.js +1 -1
- package/packages/datadog-instrumentations/src/mocha.js +1 -1
- package/packages/datadog-instrumentations/src/mysql.js +1 -1
- package/packages/datadog-instrumentations/src/mysql2.js +2 -2
- package/packages/datadog-instrumentations/src/net.js +13 -5
- package/packages/datadog-instrumentations/src/nyc.js +1 -1
- package/packages/datadog-instrumentations/src/otel-sdk-trace.js +4 -4
- package/packages/datadog-instrumentations/src/pg.js +4 -2
- package/packages/datadog-instrumentations/src/playwright.js +3 -3
- package/packages/datadog-instrumentations/src/selenium.js +2 -2
- package/packages/datadog-instrumentations/src/undici.js +12 -1
- package/packages/datadog-plugin-aws-sdk/src/base.js +4 -4
- package/packages/datadog-plugin-azure-event-hubs/src/producer.js +2 -2
- package/packages/datadog-plugin-azure-service-bus/src/producer.js +2 -2
- package/packages/datadog-plugin-cucumber/src/index.js +2 -2
- package/packages/datadog-plugin-cypress/src/cypress-plugin.js +2 -2
- package/packages/datadog-plugin-dd-trace-api/src/index.js +2 -2
- package/packages/datadog-plugin-express/src/code_origin.js +21 -15
- package/packages/datadog-plugin-fastify/src/code_origin.js +17 -4
- package/packages/datadog-plugin-jest/src/index.js +2 -2
- package/packages/datadog-plugin-mocha/src/index.js +2 -2
- package/packages/datadog-plugin-mongodb-core/src/index.js +2 -2
- package/packages/datadog-plugin-playwright/src/index.js +3 -3
- package/packages/datadog-plugin-undici/src/index.js +305 -2
- package/packages/datadog-plugin-vitest/src/index.js +5 -5
- package/packages/dd-trace/index.js +19 -0
- package/packages/dd-trace/src/appsec/iast/taint-tracking/rewriter.js +1 -1
- package/packages/dd-trace/src/appsec/rasp/index.js +2 -4
- package/packages/dd-trace/src/azure_metadata.js +8 -3
- package/packages/dd-trace/src/baggage.js +36 -11
- package/packages/dd-trace/src/ci-visibility/dynamic-instrumentation/index.js +5 -1
- package/packages/dd-trace/src/ci-visibility/early-flake-detection/get-known-tests.js +2 -2
- package/packages/dd-trace/src/ci-visibility/exporters/agentless/coverage-writer.js +2 -2
- package/packages/dd-trace/src/ci-visibility/exporters/agentless/di-logs-writer.js +2 -2
- package/packages/dd-trace/src/ci-visibility/exporters/agentless/writer.js +2 -2
- package/packages/dd-trace/src/ci-visibility/exporters/ci-visibility-exporter.js +3 -2
- package/packages/dd-trace/src/ci-visibility/exporters/git/git_metadata.js +3 -3
- package/packages/dd-trace/src/ci-visibility/exporters/test-worker/index.js +4 -4
- package/packages/dd-trace/src/ci-visibility/exporters/test-worker/writer.js +1 -1
- package/packages/dd-trace/src/ci-visibility/intelligent-test-runner/get-skippable-suites.js +2 -2
- package/packages/dd-trace/src/ci-visibility/log-submission/log-submission-plugin.js +4 -4
- package/packages/dd-trace/src/ci-visibility/requests/get-library-configuration.js +4 -4
- package/packages/dd-trace/src/ci-visibility/test-management/get-test-management-tests.js +2 -2
- package/packages/dd-trace/src/{config_defaults.js → config/defaults.js} +3 -3
- package/packages/dd-trace/src/{config-helper.js → config/helper.js} +88 -15
- package/packages/dd-trace/src/{config.js → config/index.js} +92 -45
- package/packages/dd-trace/src/config/remote_config.js +187 -19
- package/packages/dd-trace/src/{config_stable.js → config/stable.js} +20 -32
- package/packages/dd-trace/src/{supported-configurations.json → config/supported-configurations.json} +2 -0
- package/packages/dd-trace/src/crashtracking/crashtracker.js +1 -1
- package/packages/dd-trace/src/datastreams/processor.js +1 -1
- package/packages/dd-trace/src/datastreams/writer.js +1 -1
- package/packages/dd-trace/src/debugger/devtools_client/condition.js +1 -1
- package/packages/dd-trace/src/debugger/devtools_client/config.js +1 -1
- package/packages/dd-trace/src/debugger/devtools_client/send.js +3 -3
- package/packages/dd-trace/src/debugger/devtools_client/snapshot/constants.js +1 -1
- package/packages/dd-trace/src/debugger/index.js +83 -15
- package/packages/dd-trace/src/dogstatsd.js +2 -2
- package/packages/dd-trace/src/encode/0.4.js +2 -2
- package/packages/dd-trace/src/exporter.js +1 -1
- package/packages/dd-trace/src/exporters/agent/index.js +2 -4
- package/packages/dd-trace/src/exporters/agent/writer.js +9 -14
- package/packages/dd-trace/src/exporters/common/agent-info-exporter.js +1 -1
- package/packages/dd-trace/src/exporters/common/docker.js +2 -2
- package/packages/dd-trace/src/exporters/common/request.js +1 -1
- package/packages/dd-trace/src/exporters/common/util.js +2 -2
- package/packages/dd-trace/src/exporters/span-stats/index.js +1 -1
- package/packages/dd-trace/src/flare/index.js +1 -1
- package/packages/dd-trace/src/guardrails/telemetry.js +1 -1
- package/packages/dd-trace/src/index.js +4 -4
- package/packages/dd-trace/src/lambda/handler.js +2 -2
- package/packages/dd-trace/src/lambda/index.js +2 -2
- package/packages/dd-trace/src/lambda/runtime/patch.js +2 -2
- package/packages/dd-trace/src/lambda/runtime/ritm.js +2 -2
- package/packages/dd-trace/src/llmobs/constants/tags.js +8 -1
- package/packages/dd-trace/src/llmobs/index.js +2 -2
- package/packages/dd-trace/src/llmobs/noop.js +2 -0
- package/packages/dd-trace/src/llmobs/plugins/openai/index.js +3 -4
- package/packages/dd-trace/src/llmobs/sdk.js +33 -6
- package/packages/dd-trace/src/llmobs/span_processor.js +17 -7
- package/packages/dd-trace/src/llmobs/tagger.js +175 -1
- package/packages/dd-trace/src/llmobs/writers/base.js +116 -37
- package/packages/dd-trace/src/llmobs/writers/spans.js +4 -3
- package/packages/dd-trace/src/log/index.js +5 -5
- package/packages/dd-trace/src/noop/proxy.js +3 -3
- package/packages/dd-trace/src/openfeature/writers/base.js +7 -8
- package/packages/dd-trace/src/opentelemetry/otlp/otlp_http_exporter_base.js +2 -2
- package/packages/dd-trace/src/opentelemetry/tracer.js +48 -6
- package/packages/dd-trace/src/opentracing/propagation/text_map.js +45 -21
- package/packages/dd-trace/src/opentracing/span.js +4 -4
- package/packages/dd-trace/src/plugin_manager.js +8 -6
- package/packages/dd-trace/src/plugins/util/ci.js +5 -8
- package/packages/dd-trace/src/plugins/util/git-cache.js +3 -3
- package/packages/dd-trace/src/plugins/util/test.js +1 -1
- package/packages/dd-trace/src/plugins/util/user-provided-git.js +41 -43
- package/packages/dd-trace/src/profiler.js +4 -39
- package/packages/dd-trace/src/profiling/config.js +74 -31
- package/packages/dd-trace/src/profiling/exporter_cli.js +5 -5
- package/packages/dd-trace/src/profiling/exporters/agent.js +1 -1
- package/packages/dd-trace/src/profiling/exporters/event_serializer.js +9 -2
- package/packages/dd-trace/src/profiling/index.js +1 -1
- package/packages/dd-trace/src/profiling/libuv-size.js +1 -1
- package/packages/dd-trace/src/profiling/profiler.js +57 -2
- package/packages/dd-trace/src/proxy.js +34 -5
- package/packages/dd-trace/src/remote_config/capabilities.js +3 -0
- package/packages/dd-trace/src/remote_config/index.js +1 -1
- package/packages/dd-trace/src/ritm.js +8 -4
- package/packages/dd-trace/src/runtime_metrics/runtime_metrics.js +2 -2
- package/packages/dd-trace/src/serverless.js +2 -2
- package/packages/dd-trace/src/span_processor.js +2 -2
- package/packages/dd-trace/src/startup-log.js +6 -15
- package/packages/dd-trace/src/telemetry/endpoints.js +67 -5
- package/packages/dd-trace/src/telemetry/send-data.js +103 -4
- package/packages/dd-trace/src/telemetry/telemetry.js +229 -110
- /package/packages/dd-trace/src/{git_properties.js → config/git_properties.js} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dd-trace",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.83.0",
|
|
4
4
|
"description": "Datadog APM tracing client for JavaScript",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"typings": "index.d.ts",
|
|
@@ -18,61 +18,64 @@
|
|
|
18
18
|
"lint:inspect": "npx @eslint/config-inspector@latest",
|
|
19
19
|
"release:proposal": "node scripts/release/proposal",
|
|
20
20
|
"services": "node ./scripts/install_plugin_modules && node packages/dd-trace/test/setup/services",
|
|
21
|
-
"test": "
|
|
22
|
-
"test:aiguard": "mocha
|
|
21
|
+
"test": "echo '\nError: The root \"npm test\" command is intentionally disabled.\n\nInstead, run specific test suites:\n - npm run test:trace:core\n - npm run test:appsec\n - etc.\n\nOr run individual test files:\n npx mocha path/to/test.spec.js\n\nSee CONTRIBUTING.md (Testing section) for more details.\n' && exit 1",
|
|
22
|
+
"test:aiguard": "mocha packages/dd-trace/test/aiguard/**/*.spec.js",
|
|
23
23
|
"test:aiguard:ci": "nyc --no-clean --include \"packages/dd-trace/src/aiguard/**/*.js\" -- npm run test:aiguard",
|
|
24
|
-
"test:appsec": "mocha
|
|
24
|
+
"test:appsec": "mocha --exclude \"packages/dd-trace/test/appsec/**/*.plugin.spec.js\" \"packages/dd-trace/test/appsec/**/*.spec.js\"",
|
|
25
25
|
"test:appsec:ci": "nyc --no-clean --include \"packages/dd-trace/src/appsec/**/*.js\" --exclude \"packages/dd-trace/test/appsec/**/*.plugin.spec.js\" -- npm run test:appsec",
|
|
26
|
-
"test:appsec:plugins": "mocha
|
|
26
|
+
"test:appsec:plugins": "mocha \"packages/dd-trace/test/appsec/**/*.@(${PLUGINS}).plugin.spec.js\"",
|
|
27
27
|
"test:appsec:plugins:ci": "yarn services && nyc --no-clean --include \"packages/dd-trace/src/appsec/**/*.js\" -- npm run test:appsec:plugins",
|
|
28
|
-
"test:debugger": "mocha
|
|
29
|
-
"test:debugger:ci": "nyc --no-clean --include
|
|
28
|
+
"test:debugger": "mocha packages/dd-trace/test/debugger/**/*.spec.js",
|
|
29
|
+
"test:debugger:ci": "nyc --no-clean --include \"packages/dd-trace/src/debugger/**/*.js\" -- npm run test:debugger",
|
|
30
30
|
"test:eslint-rules": "node eslint-rules/*.test.mjs",
|
|
31
|
-
"test:trace:core": "node scripts/mocha-parallel-files.js --expose-gc --timeout 30000 --
|
|
31
|
+
"test:trace:core": "node scripts/mocha-parallel-files.js --expose-gc --timeout 30000 -- \"packages/dd-trace/test/*.spec.js\" \"packages/dd-trace/test/{ci-visibility,config,crashtracking,datastreams,encode,exporters,msgpack,opentelemetry,opentracing,payload-tagging,plugins,remote_config,service-naming,standalone,telemetry,external-logger}/**/*.spec.js\"",
|
|
32
32
|
"test:trace:core:ci": "nyc --no-clean --include \"packages/dd-trace/src/**/*.js\" -- npm run test:trace:core",
|
|
33
|
-
"test:trace:guardrails": "mocha
|
|
33
|
+
"test:trace:guardrails": "mocha packages/dd-trace/test/guardrails/**/*.spec.js",
|
|
34
34
|
"test:trace:guardrails:ci": "nyc --no-clean --include \"packages/dd-trace/src/guardrails/**/*.js\" -- npm run test:trace:guardrails",
|
|
35
|
-
"test:esbuild": "mocha
|
|
35
|
+
"test:esbuild": "mocha packages/datadog-esbuild/test/**/*.spec.js",
|
|
36
36
|
"test:esbuild:ci": "nyc --no-clean --include \"packages/datadog-esbuild/test/**/*.js\" -- npm run test:esbuild",
|
|
37
|
-
"test:instrumentations": "mocha
|
|
38
|
-
"test:instrumentations:ci": "yarn services && nyc --no-clean --include \"packages/datadog-instrumentations/src/@($
|
|
39
|
-
"test:instrumentations:misc": "mocha
|
|
40
|
-
"test:instrumentations:misc:ci": "nyc --no-clean --include
|
|
41
|
-
"test:core": "node scripts/mocha-parallel-files.js --expose-gc --timeout 30000 --
|
|
37
|
+
"test:instrumentations": "mocha \"packages/datadog-instrumentations/test/@(${PLUGINS}).spec.js\"",
|
|
38
|
+
"test:instrumentations:ci": "yarn services && nyc --no-clean --include \"packages/datadog-instrumentations/src/@(${PLUGINS}).js\" --include \"packages/datadog-instrumentations/src/@(${PLUGINS})/**/*.js\" -- npm run test:instrumentations",
|
|
39
|
+
"test:instrumentations:misc": "mocha packages/datadog-instrumentations/test/*/**/*.spec.js",
|
|
40
|
+
"test:instrumentations:misc:ci": "nyc --no-clean --include \"packages/datadog-instrumentations/src/**/*.js\" -- npm run test:instrumentations:misc",
|
|
41
|
+
"test:core": "node scripts/mocha-parallel-files.js --expose-gc --timeout 30000 -- packages/datadog-core/test/**/*.spec.js",
|
|
42
42
|
"test:core:ci": "nyc --no-clean --include \"packages/datadog-core/src/**/*.js\" -- npm run test:core",
|
|
43
|
-
"test:
|
|
43
|
+
"test:code-origin": "mocha packages/datadog-code-origin/test/**/*.spec.js",
|
|
44
|
+
"test:code-origin:ci": "nyc --no-clean --include \"packages/datadog-code-origin/**/*.js\" -- npm run test:code-origin",
|
|
45
|
+
"test:lambda": "mocha packages/dd-trace/test/lambda/**/*.spec.js",
|
|
44
46
|
"test:lambda:ci": "nyc --no-clean --include \"packages/dd-trace/src/lambda/**/*.js\" -- npm run test:lambda",
|
|
45
|
-
"test:llmobs:sdk": "mocha
|
|
47
|
+
"test:llmobs:sdk": "mocha --exclude \"packages/dd-trace/test/llmobs/plugins/**/*.spec.js\" \"packages/dd-trace/test/llmobs/**/*.spec.js\"",
|
|
46
48
|
"test:llmobs:sdk:ci": "nyc --no-clean --include \"packages/dd-trace/src/llmobs/**/*.js\" -- npm run test:llmobs:sdk",
|
|
47
|
-
"test:llmobs:plugins": "mocha
|
|
49
|
+
"test:llmobs:plugins": "mocha \"packages/dd-trace/test/llmobs/plugins/@(${PLUGINS})/*.spec.js\"",
|
|
48
50
|
"test:llmobs:plugins:ci": "yarn services && nyc --no-clean --include \"packages/dd-trace/src/llmobs/**/*.js\" -- npm run test:llmobs:plugins",
|
|
49
|
-
"test:openfeature": "mocha
|
|
51
|
+
"test:openfeature": "mocha packages/dd-trace/test/openfeature/**/*.spec.js",
|
|
50
52
|
"test:openfeature:ci": "nyc --no-clean --include \"packages/dd-trace/src/openfeature/**/*.js\" -- npm run test:openfeature",
|
|
51
|
-
"test:plugins": "
|
|
52
|
-
"test:plugins:ci": "yarn services && nyc --no-clean --include \"packages/datadog-plugin-@($
|
|
53
|
-
"test:plugins:ci:flaky": "yarn services && nyc --no-clean --include \"packages/datadog-plugin-@($
|
|
53
|
+
"test:plugins": "node --expose-gc ./node_modules/mocha/bin/mocha.js \"packages/datadog-plugin-@(${PLUGINS})/test/**/${SPEC:-*}*.spec.js\"",
|
|
54
|
+
"test:plugins:ci": "yarn services && nyc --no-clean --include \"packages/datadog-plugin-@(${PLUGINS})/src/**/*.js\" -- npm run test:plugins",
|
|
55
|
+
"test:plugins:ci:flaky": "yarn services && nyc --no-clean --include \"packages/datadog-plugin-@(${PLUGINS})/src/**/*.js\" -- npm run test:plugins -- --bail --retries 2",
|
|
54
56
|
"test:plugins:upstream": "node ./packages/dd-trace/test/plugins/suite.js",
|
|
55
|
-
"test:profiler": "node scripts/mocha-parallel-files.js --expose-gc --timeout 30000 --
|
|
57
|
+
"test:profiler": "node scripts/mocha-parallel-files.js --expose-gc --timeout 30000 -- packages/dd-trace/test/profiling/**/*.spec.js",
|
|
56
58
|
"test:profiler:ci": "nyc --no-clean --include \"packages/dd-trace/src/profiling/**/*.js\" -- npm run test:profiler",
|
|
57
|
-
"test:integration": "mocha --timeout 60000
|
|
58
|
-
"test:integration:aiguard": "mocha --timeout 60000
|
|
59
|
-
"test:integration:appsec": "mocha --timeout 60000
|
|
60
|
-
"test:integration:cucumber": "mocha --timeout 60000
|
|
61
|
-
"test:integration:cypress": "mocha --timeout 60000
|
|
62
|
-
"test:integration:debugger": "mocha --timeout 60000
|
|
63
|
-
"test:integration:esbuild": "mocha --timeout 60000
|
|
64
|
-
"test:integration:openfeature": "mocha --timeout 60000
|
|
65
|
-
"test:integration:jest": "mocha --timeout 60000
|
|
66
|
-
"test:integration:mocha": "mocha --timeout 60000
|
|
67
|
-
"test:integration:playwright": "mocha --timeout 60000
|
|
68
|
-
"test:integration:selenium": "mocha --timeout 60000
|
|
69
|
-
"test:integration:vitest": "mocha --timeout 60000
|
|
70
|
-
"test:integration:testopt": "mocha --timeout 120000
|
|
71
|
-
"test:integration:profiler": "mocha --timeout 180000
|
|
72
|
-
"test:integration:plugins": "mocha
|
|
73
|
-
"test:unit:plugins": "mocha
|
|
74
|
-
"test:shimmer": "mocha
|
|
75
|
-
"test:shimmer:ci": "nyc --no-clean --include
|
|
59
|
+
"test:integration": "mocha --timeout 60000 \"integration-tests/*.spec.js\"",
|
|
60
|
+
"test:integration:aiguard": "mocha --timeout 60000 \"integration-tests/aiguard/*.spec.js\"",
|
|
61
|
+
"test:integration:appsec": "mocha --timeout 60000 \"integration-tests/appsec/*.spec.js\"",
|
|
62
|
+
"test:integration:cucumber": "mocha --timeout 60000 \"integration-tests/cucumber/*.spec.js\"",
|
|
63
|
+
"test:integration:cypress": "mocha --timeout 60000 \"integration-tests/cypress/*.spec.js\"",
|
|
64
|
+
"test:integration:debugger": "mocha --timeout 60000 \"integration-tests/debugger/*.spec.js\"",
|
|
65
|
+
"test:integration:esbuild": "mocha --timeout 60000 \"integration-tests/esbuild/*.spec.js\"",
|
|
66
|
+
"test:integration:openfeature": "mocha --timeout 60000 \"integration-tests/openfeature/*.spec.js\"",
|
|
67
|
+
"test:integration:jest": "mocha --timeout 60000 \"integration-tests/jest/*.spec.js\"",
|
|
68
|
+
"test:integration:mocha": "mocha --timeout 60000 \"integration-tests/mocha/*.spec.js\"",
|
|
69
|
+
"test:integration:playwright": "mocha --timeout 60000 \"integration-tests/playwright/*.spec.js\"",
|
|
70
|
+
"test:integration:selenium": "mocha --timeout 60000 \"integration-tests/selenium/*.spec.js\"",
|
|
71
|
+
"test:integration:vitest": "mocha --timeout 60000 \"integration-tests/vitest/*.spec.js\"",
|
|
72
|
+
"test:integration:testopt": "mocha --timeout 120000 \"integration-tests/ci-visibility/*.spec.js\"",
|
|
73
|
+
"test:integration:profiler": "mocha --timeout 180000 \"integration-tests/profiler/*.spec.js\"",
|
|
74
|
+
"test:integration:plugins": "mocha \"packages/datadog-plugin-@($(echo $PLUGINS))/test/integration-test/**/*.spec.js\"",
|
|
75
|
+
"test:unit:plugins": "mocha \"packages/datadog-instrumentations/test/@($(echo $PLUGINS)).spec.js\" \"packages/datadog-plugin-@($(echo $PLUGINS))/test/**/*.spec.js\" --exclude \"packages/datadog-plugin-@($(echo $PLUGINS))/test/integration-test/**/*.spec.js\"",
|
|
76
|
+
"test:shimmer": "mocha \"packages/datadog-shimmer/test/**/*.spec.js\"",
|
|
77
|
+
"test:shimmer:ci": "nyc --no-clean --include \"packages/datadog-shimmer/src/**/*.js\" -- npm run test:shimmer",
|
|
78
|
+
"verify-exercised-tests": "node scripts/verify-exercised-tests.js"
|
|
76
79
|
},
|
|
77
80
|
"repository": {
|
|
78
81
|
"type": "git",
|
|
@@ -127,7 +130,7 @@
|
|
|
127
130
|
],
|
|
128
131
|
"dependencies": {
|
|
129
132
|
"dc-polyfill": "^0.1.10",
|
|
130
|
-
"import-in-the-middle": "2.0.
|
|
133
|
+
"import-in-the-middle": "2.0.3"
|
|
131
134
|
},
|
|
132
135
|
"optionalDependencies": {
|
|
133
136
|
"@datadog/libdatadog": "0.7.0",
|
|
@@ -135,37 +138,37 @@
|
|
|
135
138
|
"@datadog/native-iast-taint-tracking": "4.1.0",
|
|
136
139
|
"@datadog/native-metrics": "3.1.1",
|
|
137
140
|
"@datadog/openfeature-node-server": "^0.2.0",
|
|
138
|
-
"@datadog/pprof": "5.13.
|
|
141
|
+
"@datadog/pprof": "5.13.2",
|
|
139
142
|
"@datadog/wasm-js-rewriter": "5.0.1",
|
|
140
143
|
"@opentelemetry/api": ">=1.0.0 <1.10.0",
|
|
141
144
|
"@opentelemetry/api-logs": "<1.0.0"
|
|
142
145
|
},
|
|
143
146
|
"devDependencies": {
|
|
144
|
-
"@babel/helpers": "^7.28.
|
|
147
|
+
"@babel/helpers": "^7.28.6",
|
|
145
148
|
"@eslint/eslintrc": "^3.3.1",
|
|
146
|
-
"@eslint/js": "^9.39.
|
|
147
|
-
"@msgpack/msgpack": "^3.1.
|
|
149
|
+
"@eslint/js": "^9.39.2",
|
|
150
|
+
"@msgpack/msgpack": "^3.1.3",
|
|
148
151
|
"@openfeature/core": "^1.8.1",
|
|
149
152
|
"@openfeature/server-sdk": "~1.20.0",
|
|
150
|
-
"@stylistic/eslint-plugin": "^5.
|
|
153
|
+
"@stylistic/eslint-plugin": "^5.7.0",
|
|
151
154
|
"@types/mocha": "^10.0.10",
|
|
152
155
|
"@types/node": "^18.19.106",
|
|
153
156
|
"@types/sinon": "^21.0.0",
|
|
154
157
|
"axios": "^1.12.2",
|
|
155
158
|
"benchmark": "^2.1.4",
|
|
156
|
-
"body-parser": "^2.2.
|
|
157
|
-
"bun": "1.3.
|
|
158
|
-
"eslint": "^9.39.
|
|
159
|
-
"eslint-plugin-cypress": "^5.2.
|
|
159
|
+
"body-parser": "^2.2.2",
|
|
160
|
+
"bun": "1.3.6",
|
|
161
|
+
"eslint": "^9.39.2",
|
|
162
|
+
"eslint-plugin-cypress": "^5.2.1",
|
|
160
163
|
"eslint-plugin-import": "^2.32.0",
|
|
161
|
-
"eslint-plugin-jsdoc": "^
|
|
164
|
+
"eslint-plugin-jsdoc": "^62.0.0",
|
|
162
165
|
"eslint-plugin-mocha": "^11.2.0",
|
|
163
|
-
"eslint-plugin-n": "^17.23.
|
|
166
|
+
"eslint-plugin-n": "^17.23.2",
|
|
164
167
|
"eslint-plugin-promise": "^7.2.1",
|
|
165
168
|
"eslint-plugin-unicorn": "^62.0.0",
|
|
166
169
|
"express": "^5.1.0",
|
|
167
170
|
"glob": "^10.4.5",
|
|
168
|
-
"globals": "^
|
|
171
|
+
"globals": "^17.0.0",
|
|
169
172
|
"graphql": "*",
|
|
170
173
|
"jszip": "^3.10.1",
|
|
171
174
|
"mocha": "^11.6.0",
|
|
@@ -10,12 +10,12 @@ const { AsyncLocalStorage } = require('async_hooks')
|
|
|
10
10
|
* a "handle" object, which is used as a key in a WeakMap, where the values
|
|
11
11
|
* are the real store objects.
|
|
12
12
|
*
|
|
13
|
-
* @
|
|
13
|
+
* @template T
|
|
14
|
+
* @typedef {Record<string, T>} Store
|
|
14
15
|
*/
|
|
15
16
|
class DatadogStorage extends AsyncLocalStorage {
|
|
16
17
|
/**
|
|
17
|
-
*
|
|
18
|
-
* @param {Store} [store]
|
|
18
|
+
* @param {Store<unknown>} [store]
|
|
19
19
|
* @override
|
|
20
20
|
*/
|
|
21
21
|
enterWith (store) {
|
|
@@ -35,7 +35,7 @@ class DatadogStorage extends AsyncLocalStorage {
|
|
|
35
35
|
*
|
|
36
36
|
* TODO: Refactor the Scope class to use a span-only store and remove this.
|
|
37
37
|
*
|
|
38
|
-
* @returns {Store}
|
|
38
|
+
* @returns {Store<unknown>}
|
|
39
39
|
*/
|
|
40
40
|
getHandle () {
|
|
41
41
|
return super.getStore()
|
|
@@ -48,7 +48,7 @@ class DatadogStorage extends AsyncLocalStorage {
|
|
|
48
48
|
* key. This is useful if you've stashed a handle somewhere and want to
|
|
49
49
|
* retrieve the store with it.
|
|
50
50
|
* @param {object} [handle]
|
|
51
|
-
* @returns {Store | undefined}
|
|
51
|
+
* @returns {Store<unknown> | undefined}
|
|
52
52
|
* @override
|
|
53
53
|
*/
|
|
54
54
|
getStore (handle) {
|
|
@@ -68,7 +68,7 @@ class DatadogStorage extends AsyncLocalStorage {
|
|
|
68
68
|
* WeakMap.
|
|
69
69
|
* @template R
|
|
70
70
|
* @template TArgs = unknown[]
|
|
71
|
-
* @param {Store} store
|
|
71
|
+
* @param {Store<unknown>} store
|
|
72
72
|
* @param {() => R} fn
|
|
73
73
|
* @param {...TArgs} args
|
|
74
74
|
* @returns {R}
|
|
@@ -87,7 +87,7 @@ class DatadogStorage extends AsyncLocalStorage {
|
|
|
87
87
|
|
|
88
88
|
/**
|
|
89
89
|
* This is the map from handles to real stores, used in the class above.
|
|
90
|
-
* @type {WeakMap<WeakKey, Store
|
|
90
|
+
* @type {WeakMap<WeakKey, Store<unknown>|undefined>}
|
|
91
91
|
*/
|
|
92
92
|
const stores = new WeakMap()
|
|
93
93
|
|
|
@@ -97,6 +97,12 @@ function getGitMetadata () {
|
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
module.exports.setup = function (build) {
|
|
100
|
+
if (build.initialOptions.minify && !build.initialOptions.keepNames) {
|
|
101
|
+
throw new Error(
|
|
102
|
+
'Using --minify without --keep-names will break some dd-trace behavior. Refusing to bundle.'
|
|
103
|
+
)
|
|
104
|
+
}
|
|
105
|
+
|
|
100
106
|
if (DD_IAST_ENABLED) {
|
|
101
107
|
const iastRewriter = require('../dd-trace/src/appsec/iast/taint-tracking/rewriter')
|
|
102
108
|
rewriter = iastRewriter.getRewriter()
|
|
@@ -41,8 +41,14 @@ const noopTracer = {
|
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
const tracers = new WeakSet()
|
|
45
|
+
|
|
44
46
|
function wrapTracer (tracer) {
|
|
45
|
-
if (
|
|
47
|
+
if (tracers.has(tracer)) {
|
|
48
|
+
return
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
tracers.add(tracer)
|
|
46
52
|
|
|
47
53
|
shimmer.wrap(tracer, 'startActiveSpan', function (startActiveSpan) {
|
|
48
54
|
return function () {
|
|
@@ -90,8 +96,6 @@ function wrapTracer (tracer) {
|
|
|
90
96
|
})
|
|
91
97
|
}
|
|
92
98
|
})
|
|
93
|
-
|
|
94
|
-
Object.defineProperty(tracer, Symbol.for('_dd.wrapped'), { value: true })
|
|
95
99
|
}
|
|
96
100
|
|
|
97
101
|
function wrapWithTracer (fn) {
|
|
@@ -214,7 +214,7 @@ function wrapChildProcessAsyncMethod (ChildProcess, shell = false) {
|
|
|
214
214
|
childProcessChannel.error.publish(context)
|
|
215
215
|
})
|
|
216
216
|
|
|
217
|
-
childProcess.
|
|
217
|
+
childProcess.once('close', (code = 0) => {
|
|
218
218
|
if (!errorExecuted && code !== 0) {
|
|
219
219
|
childProcessChannel.error.publish(context)
|
|
220
220
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const { createCoverageMap } = require('../../../vendor/dist/istanbul-lib-coverage')
|
|
4
4
|
const shimmer = require('../../datadog-shimmer')
|
|
5
5
|
const log = require('../../dd-trace/src/log')
|
|
6
|
-
const { getEnvironmentVariable } = require('../../dd-trace/src/config
|
|
6
|
+
const { getEnvironmentVariable } = require('../../dd-trace/src/config/helper')
|
|
7
7
|
const {
|
|
8
8
|
getCoveredFilenamesFromCoverage,
|
|
9
9
|
resetCoverage,
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
+
// Use a global symbol to prevent stealthy-require to interfere.
|
|
4
|
+
// TODO: Use the symbol from dd-trace instead and remove this file.
|
|
3
5
|
const sym = Symbol.for('_ddtrace_instrumentations')
|
|
6
|
+
globalThis[sym] ??= {}
|
|
4
7
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
module.exports = global[sym]
|
|
8
|
+
module.exports = globalThis[sym]
|
|
@@ -7,18 +7,14 @@ const requirePackageJson = require('../../../dd-trace/src/require-package-json')
|
|
|
7
7
|
const log = require('../../../dd-trace/src/log')
|
|
8
8
|
const telemetry = require('../../../dd-trace/src/guardrails/telemetry')
|
|
9
9
|
const { isInServerlessEnvironment } = require('../../../dd-trace/src/serverless')
|
|
10
|
-
const {
|
|
10
|
+
const { getValueFromEnvSources } = require('../../../dd-trace/src/config/helper')
|
|
11
11
|
const checkRequireCache = require('./check-require-cache')
|
|
12
12
|
const Hook = require('./hook')
|
|
13
13
|
const { isRelativeRequire } = require('./shared-utils')
|
|
14
14
|
const rewriter = require('./rewriter')
|
|
15
15
|
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
const {
|
|
19
|
-
DD_TRACE_DISABLED_INSTRUMENTATIONS = '',
|
|
20
|
-
DD_TRACE_DEBUG = ''
|
|
21
|
-
} = envs
|
|
16
|
+
const DD_TRACE_DISABLED_INSTRUMENTATIONS = getValueFromEnvSources('DD_TRACE_DISABLED_INSTRUMENTATIONS') || ''
|
|
17
|
+
const DD_TRACE_DEBUG = getValueFromEnvSources('DD_TRACE_DEBUG') || ''
|
|
22
18
|
|
|
23
19
|
const hooks = require('./hooks')
|
|
24
20
|
const instrumentations = require('./instrumentations')
|
|
@@ -35,7 +35,7 @@ const { readFileSync } = require('fs')
|
|
|
35
35
|
const { join } = require('path')
|
|
36
36
|
const semifies = require('../../../../../vendor/dist/semifies')
|
|
37
37
|
const log = require('../../../../dd-trace/src/log')
|
|
38
|
-
const { getEnvironmentVariable } = require('../../../../dd-trace/src/config
|
|
38
|
+
const { getEnvironmentVariable } = require('../../../../dd-trace/src/config/helper')
|
|
39
39
|
const transforms = require('./transforms')
|
|
40
40
|
const { generate, parse, traverse } = require('./compiler')
|
|
41
41
|
const instrumentations = require('./instrumentations')
|
|
@@ -101,8 +101,8 @@ function patch (http, methodName) {
|
|
|
101
101
|
case 'response': {
|
|
102
102
|
const res = arg
|
|
103
103
|
ctx.res = res
|
|
104
|
-
res.
|
|
105
|
-
res.
|
|
104
|
+
res.once('end', finish)
|
|
105
|
+
res.once(errorMonitor, finish)
|
|
106
106
|
break
|
|
107
107
|
}
|
|
108
108
|
case 'connect':
|
|
@@ -93,6 +93,8 @@ const testsToBeRetried = new Set()
|
|
|
93
93
|
const testSuiteAbsolutePathsWithFastCheck = new Set()
|
|
94
94
|
|
|
95
95
|
const BREAKPOINT_HIT_GRACE_PERIOD_MS = 200
|
|
96
|
+
const ATR_RETRY_SUPPRESSION_FLAG = '_ddDisableAtrRetry'
|
|
97
|
+
const atrSuppressedErrors = new Map()
|
|
96
98
|
|
|
97
99
|
// based on https://github.com/facebook/jest/blob/main/packages/jest-circus/src/formatNodeAssertErrors.ts#L41
|
|
98
100
|
function formatJestError (errors) {
|
|
@@ -378,7 +380,10 @@ function getWrappedEnvironment (BaseEnvironment, jestVersion) {
|
|
|
378
380
|
isNewTest = retriedTestsToNumAttempts.has(testName)
|
|
379
381
|
}
|
|
380
382
|
|
|
381
|
-
|
|
383
|
+
const willRunEfd = this.isEarlyFlakeDetectionEnabled && (isNewTest || isModified)
|
|
384
|
+
event.test[ATR_RETRY_SUPPRESSION_FLAG] = Boolean(isAttemptToFix || willRunEfd)
|
|
385
|
+
|
|
386
|
+
if (!isAttemptToFix && willRunEfd) {
|
|
382
387
|
numEfdRetry = retriedTestsToNumAttempts.get(testName)
|
|
383
388
|
retriedTestsToNumAttempts.set(testName, numEfdRetry + 1)
|
|
384
389
|
}
|
|
@@ -434,19 +439,22 @@ function getWrappedEnvironment (BaseEnvironment, jestVersion) {
|
|
|
434
439
|
|
|
435
440
|
const testFullName = this.getTestNameFromAddTestEvent(event, state)
|
|
436
441
|
const isSkipped = event.mode === 'todo' || event.mode === 'skip'
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
442
|
+
const isAttemptToFix = this.isTestManagementTestsEnabled &&
|
|
443
|
+
this.testManagementTestsForThisSuite?.attemptToFix?.includes(testFullName)
|
|
444
|
+
if (
|
|
445
|
+
isAttemptToFix &&
|
|
446
|
+
!isSkipped &&
|
|
447
|
+
!retriedTestsToNumAttempts.has(testFullName)
|
|
448
|
+
) {
|
|
449
|
+
retriedTestsToNumAttempts.set(testFullName, 0)
|
|
450
|
+
testsToBeRetried.add(testFullName)
|
|
451
|
+
this.retryTest({
|
|
452
|
+
jestEvent: event,
|
|
453
|
+
retryCount: testManagementAttemptToFixRetries,
|
|
454
|
+
retryType: 'Test Management (Attempt to Fix)'
|
|
455
|
+
})
|
|
448
456
|
}
|
|
449
|
-
if (this.isImpactedTestsEnabled) {
|
|
457
|
+
if (!isAttemptToFix && this.isImpactedTestsEnabled) {
|
|
450
458
|
const testStartLine = getTestLineStart(event.asyncError, this.testSuite)
|
|
451
459
|
const testEndLine = getTestEndLine(event.fn, testStartLine)
|
|
452
460
|
const isModified = isModifiedTest(
|
|
@@ -466,7 +474,7 @@ function getWrappedEnvironment (BaseEnvironment, jestVersion) {
|
|
|
466
474
|
})
|
|
467
475
|
}
|
|
468
476
|
}
|
|
469
|
-
if (this.isKnownTestsEnabled) {
|
|
477
|
+
if (!isAttemptToFix && this.isKnownTestsEnabled) {
|
|
470
478
|
const isNew = !this.knownTestsForThisSuite.includes(testFullName)
|
|
471
479
|
if (isNew && !isSkipped && !retriedTestsToNumAttempts.has(testFullName)) {
|
|
472
480
|
retriedTestsToNumAttempts.set(testFullName, 0)
|
|
@@ -488,6 +496,13 @@ function getWrappedEnvironment (BaseEnvironment, jestVersion) {
|
|
|
488
496
|
}
|
|
489
497
|
// restore in case it is retried
|
|
490
498
|
event.test.fn = originalTestFns.get(event.test)
|
|
499
|
+
// If ATR retry is being suppressed for this test (due to EFD or Attempt to Fix taking precedence)
|
|
500
|
+
// and the test has errors for this attempt, store the errors temporarily and clear them
|
|
501
|
+
// so Jest won't treat this attempt as failed (the real status will be reported after retries).
|
|
502
|
+
if (event.test?.[ATR_RETRY_SUPPRESSION_FLAG] && event.test.errors?.length) {
|
|
503
|
+
atrSuppressedErrors.set(event.test, event.test.errors)
|
|
504
|
+
event.test.errors = []
|
|
505
|
+
}
|
|
491
506
|
|
|
492
507
|
let attemptToFixPassed = false
|
|
493
508
|
let attemptToFixFailed = false
|
|
@@ -581,6 +596,12 @@ function getWrappedEnvironment (BaseEnvironment, jestVersion) {
|
|
|
581
596
|
await promises.isProbeReady
|
|
582
597
|
}
|
|
583
598
|
}
|
|
599
|
+
if (event.name === 'run_finish') {
|
|
600
|
+
for (const [test, errors] of atrSuppressedErrors) {
|
|
601
|
+
test.errors = errors
|
|
602
|
+
}
|
|
603
|
+
atrSuppressedErrors.clear()
|
|
604
|
+
}
|
|
584
605
|
if (event.name === 'test_skip' || event.name === 'test_todo') {
|
|
585
606
|
const testName = getJestTestName(event.test, this.getShouldStripSeedFromTestName())
|
|
586
607
|
testSkippedCh.publish({
|
|
@@ -90,7 +90,8 @@ function wrapMiddleware (fn, layer) {
|
|
|
90
90
|
const req = ctx.req
|
|
91
91
|
|
|
92
92
|
const path = layer && layer.path
|
|
93
|
-
const route = typeof path === 'string' && !path.endsWith('(.*)') && !path.endsWith('([^/]*)') &&
|
|
93
|
+
const route = typeof path === 'string' && !path.endsWith('(.*)') && !path.endsWith('([^/]*)') &&
|
|
94
|
+
!path.includes('(?:') && path
|
|
94
95
|
|
|
95
96
|
enterChannel.publish({ req, name, route })
|
|
96
97
|
|
|
@@ -62,8 +62,8 @@ function wrapDispatchFunc (dispatchFunc) {
|
|
|
62
62
|
|
|
63
63
|
// light-my-request Response emits 'finish' when done
|
|
64
64
|
if (res.on && typeof res.on === 'function') {
|
|
65
|
-
res.
|
|
66
|
-
res.
|
|
65
|
+
res.once('finish', onFinish)
|
|
66
|
+
res.once('close', onFinish)
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
// Also wrap end() as fallback
|
|
@@ -5,7 +5,7 @@ const { addHook, channel } = require('../helpers/instrument')
|
|
|
5
5
|
const shimmer = require('../../../datadog-shimmer')
|
|
6
6
|
const { isMarkedAsUnskippable } = require('../../../datadog-plugin-jest/src/util')
|
|
7
7
|
const log = require('../../../dd-trace/src/log')
|
|
8
|
-
const { getEnvironmentVariable } = require('../../../dd-trace/src/config
|
|
8
|
+
const { getEnvironmentVariable } = require('../../../dd-trace/src/config/helper')
|
|
9
9
|
const {
|
|
10
10
|
getTestSuitePath,
|
|
11
11
|
MOCHA_WORKER_TRACE_PAYLOAD_CODE,
|
|
@@ -282,7 +282,7 @@ function getExecutionConfiguration (runner, isParallel, frameworkVersion, onFini
|
|
|
282
282
|
if (config.isTestManagementTestsEnabled) {
|
|
283
283
|
ctx.onDone = onReceivedTestManagementTests
|
|
284
284
|
testManagementTestsCh.runStores(ctx, () => {})
|
|
285
|
-
} if (config.isImpactedTestsEnabled) {
|
|
285
|
+
} else if (config.isImpactedTestsEnabled) {
|
|
286
286
|
ctx.onDone = onReceivedImpactedTests
|
|
287
287
|
modifiedFilesCh.runStores(ctx, () => {})
|
|
288
288
|
} else if (config.isSuitesSkippingEnabled) {
|
|
@@ -67,7 +67,7 @@ addHook({
|
|
|
67
67
|
return run.apply(this, arguments)
|
|
68
68
|
}
|
|
69
69
|
// We flush when the worker ends with its test file (a mocha instance in a worker runs a single test file)
|
|
70
|
-
this.
|
|
70
|
+
this.once('end', () => {
|
|
71
71
|
workerFinishCh.publish()
|
|
72
72
|
})
|
|
73
73
|
this.on('test', getOnTestHandler(false))
|
|
@@ -39,7 +39,7 @@ addHook({ name: 'mysql', file: 'lib/Connection.js', versions: ['>=2'] }, Connect
|
|
|
39
39
|
return finishCh.runStores(ctx, cb, this, error, result)
|
|
40
40
|
})
|
|
41
41
|
} else {
|
|
42
|
-
res.
|
|
42
|
+
res.once('end', () => finishCh.publish(ctx))
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
return res
|
|
@@ -141,11 +141,11 @@ function wrapConnection (Connection, version) {
|
|
|
141
141
|
finishCh.runStores(ctx, onResult, this, ...arguments)
|
|
142
142
|
})
|
|
143
143
|
} else {
|
|
144
|
-
this.
|
|
144
|
+
this.once(errorMonitor, error => {
|
|
145
145
|
ctx.error = error
|
|
146
146
|
errorCh.publish(ctx)
|
|
147
147
|
})
|
|
148
|
-
this.
|
|
148
|
+
this.once('end', () => finishCh.publish(ctx))
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
this.execute = execute
|
|
@@ -101,7 +101,7 @@ function getOptions (args) {
|
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
function setupListeners (socket, protocol, ctx, finishCh, errorCh) {
|
|
104
|
-
const events = [
|
|
104
|
+
const events = [errorMonitor, 'close', 'timeout']
|
|
105
105
|
|
|
106
106
|
const wrapListener = function (error) {
|
|
107
107
|
if (error) {
|
|
@@ -109,27 +109,35 @@ function setupListeners (socket, protocol, ctx, finishCh, errorCh) {
|
|
|
109
109
|
errorCh.publish(ctx)
|
|
110
110
|
}
|
|
111
111
|
finishCh.runStores(ctx, () => {})
|
|
112
|
+
cleanupOtherListeners()
|
|
112
113
|
}
|
|
113
114
|
|
|
114
|
-
const localListener = function () {
|
|
115
|
+
const localListener = function (error) {
|
|
115
116
|
ctx.socket = socket
|
|
116
117
|
connectionCh.publish(ctx)
|
|
118
|
+
if (error) {
|
|
119
|
+
ctx.error = error
|
|
120
|
+
errorCh.publish(ctx)
|
|
121
|
+
}
|
|
122
|
+
finishCh.runStores(ctx, () => {})
|
|
123
|
+
cleanupOtherListeners()
|
|
117
124
|
}
|
|
118
125
|
|
|
119
|
-
const
|
|
126
|
+
const cleanupOtherListeners = function () {
|
|
120
127
|
socket.removeListener('connect', localListener)
|
|
121
128
|
events.forEach(event => {
|
|
122
129
|
socket.removeListener(event, wrapListener)
|
|
123
|
-
socket.removeListener(event, cleanupListener)
|
|
124
130
|
})
|
|
125
131
|
}
|
|
126
132
|
|
|
133
|
+
// TODO: Identify why the connect listener should remove the other listeners.
|
|
127
134
|
if (protocol === 'tcp') {
|
|
128
135
|
socket.once('connect', localListener)
|
|
136
|
+
} else {
|
|
137
|
+
events.push('connect')
|
|
129
138
|
}
|
|
130
139
|
|
|
131
140
|
events.forEach(event => {
|
|
132
141
|
socket.once(event, wrapListener)
|
|
133
|
-
socket.once(event, cleanupListener)
|
|
134
142
|
})
|
|
135
143
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
const shimmer = require('../../datadog-shimmer')
|
|
4
|
-
const { getEnvironmentVariable } = require('../../dd-trace/src/config
|
|
4
|
+
const { getEnvironmentVariable } = require('../../dd-trace/src/config/helper')
|
|
5
5
|
const { addHook, channel } = require('./helpers/instrument')
|
|
6
6
|
|
|
7
7
|
const codeCoverageWrapCh = channel('ci:nyc:wrap')
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
const shimmer = require('../../datadog-shimmer')
|
|
4
4
|
const tracer = require('../../dd-trace')
|
|
5
|
-
const {
|
|
5
|
+
const { getValueFromEnvSources } = require('../../dd-trace/src/config/helper')
|
|
6
6
|
const { addHook } = require('./helpers/instrument')
|
|
7
7
|
|
|
8
|
-
const otelSdkEnabled =
|
|
9
|
-
|
|
10
|
-
? !
|
|
8
|
+
const otelSdkEnabled = getValueFromEnvSources('DD_TRACE_OTEL_ENABLED') ||
|
|
9
|
+
getValueFromEnvSources('OTEL_SDK_DISABLED')
|
|
10
|
+
? !getValueFromEnvSources('OTEL_SDK_DISABLED')
|
|
11
11
|
: undefined
|
|
12
12
|
|
|
13
13
|
if (otelSdkEnabled) {
|