Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[test optimization] Lighter init in worker thread #5293

Merged
merged 1 commit into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ci/init.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable no-console */
const tracer = require('../packages/dd-trace')
const { isTrue } = require('../packages/dd-trace/src/util')
const { isTrue, isFalse } = require('../packages/dd-trace/src/util')
const log = require('../packages/dd-trace/src/log')

const isJestWorker = !!process.env.JEST_WORKER_ID
Expand All @@ -23,7 +23,7 @@ const options = {
flushInterval: isJestWorker ? 0 : 5000
}

let shouldInit = true
let shouldInit = !isFalse(process.env.DD_CIVISIBILITY_ENABLED)

if (isPackageManager()) {
log.debug('dd-trace is not initialized in a package manager.')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,12 @@ class TestVisDynamicInstrumentation {
// To avoid infinite initialization loops, we're disabling DI and tracing in the worker.
env: {
...process.env,
DD_CIVISIBILITY_ENABLED: 0,
DD_TRACE_ENABLED: 0,
DD_TEST_FAILED_TEST_REPLAY_ENABLED: 0
DD_TEST_FAILED_TEST_REPLAY_ENABLED: 0,
DD_CIVISIBILITY_MANUAL_API_ENABLED: 0,
DD_TRACING_ENABLED: 0,
DD_TRACE_TELEMETRY_ENABLED: 0
},
workerData: {
config: config.serialize(),
Expand Down
Loading