Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
dc63580
Create ConfigEnvSources and tests
mtoffl01 Nov 24, 2025
5552732
fix circular dependency
mtoffl01 Nov 24, 2025
fa0b085
Migrate civis call to use getEnvironmnetVariableSources instead
mtoffl01 Nov 24, 2025
4a3da0a
run linter
mtoffl01 Nov 24, 2025
45358ab
cleanup comments on config-env-sources
mtoffl01 Nov 24, 2025
aec7352
complete ci/init.js migration
mtoffl01 Nov 24, 2025
e20d877
migrate otel-sdk-trace.js
mtoffl01 Nov 24, 2025
c9ec19a
assert getResolvedEnv behaves just like getEnvironmentVariable when o…
mtoffl01 Nov 24, 2025
4eaa3d2
migrate register.js
mtoffl01 Nov 24, 2025
908c10b
migrate DD_TRACE_AWS_SDK_BATCH_PROPAGATION_ENABLED
mtoffl01 Nov 24, 2025
6b21eae
migrate DD_TRACE_AZURE_EVENTHUBS_BATCH_LINKS_ENABLED and DD_TRACE_AZU…
mtoffl01 Nov 24, 2025
8fe1fd3
migrate cypress and cucumber DD_CIVISIBILITY_AUTO_INSTRUMENTATION_PRO…
mtoffl01 Nov 24, 2025
5811b1d
migrate dd-trace-api, mocha and jest
mtoffl01 Nov 25, 2025
cfab8fb
migrate mongodb, playwright and vitest plugins
mtoffl01 Nov 25, 2025
26de803
migrate index.js -- specifically for disablement env vars -- and upda…
mtoffl01 Nov 25, 2025
d6ea4a0
migrate plugin_manager
mtoffl01 Nov 25, 2025
803e2bb
migrate DD_API_KEY in proxy.js
mtoffl01 Nov 25, 2025
aa67d70
Finish bulk migration
mtoffl01 Nov 25, 2025
d8afa93
fix debugger test: reset configenvsources
mtoffl01 Nov 25, 2025
75cccd5
Fix failing tests in ci
mtoffl01 Nov 25, 2025
a76179d
fix failing lambda tets and aws-sdk tests
mtoffl01 Nov 25, 2025
3e0b148
whoops - include all changes to lambda tests
mtoffl01 Nov 25, 2025
a532c6a
migrate DD_TRACE_ENCODING_DEBUG and DD_TRACE_EXPERIMENTAL_STATE_TRACKING
mtoffl01 Dec 4, 2025
95d33ef
Try out not cachine env vars
mtoffl01 Dec 4, 2025
4ef817d
update config-env-sources tests accordingly
mtoffl01 Dec 4, 2025
fe7b294
Remove calls to resetConfigEnvSources in legacy tests
mtoffl01 Dec 4, 2025
4d322ce
Merge branch 'master' into mtoff/dcfg-getEnv-migration
mtoffl01 Dec 4, 2025
206372f
nits
mtoffl01 Dec 4, 2025
9efdeb2
Merge branch 'mtoff/dcfg-getEnv-migration' of github.com:DataDog/dd-t…
mtoffl01 Dec 4, 2025
fa275a6
restore exporter.spec.js
mtoffl01 Dec 4, 2025
959ab44
have Config re-use the stable config entries from ConfigEnvSources
mtoffl01 Dec 5, 2025
51d2443
Add doc for ConfigEnvSources
mtoffl01 Dec 5, 2025
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
7 changes: 4 additions & 3 deletions ci/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const tracer = require('../packages/dd-trace')
const { isTrue, isFalse } = require('../packages/dd-trace/src/util')
const log = require('../packages/dd-trace/src/log')
const { getEnvironmentVariable } = require('../packages/dd-trace/src/config-helper')
const { getResolvedEnv } = require('../packages/dd-trace/src/config-env-sources')

const PACKAGE_MANAGERS = ['npm', 'yarn', 'pnpm']
const DEFAULT_FLUSH_INTERVAL = 5000
Expand Down Expand Up @@ -43,8 +44,8 @@ const baseOptions = {
flushInterval: isJestWorker ? JEST_FLUSH_INTERVAL : DEFAULT_FLUSH_INTERVAL
}

let shouldInit = !isFalse(getEnvironmentVariable('DD_CIVISIBILITY_ENABLED'))
const isAgentlessEnabled = isTrue(getEnvironmentVariable('DD_CIVISIBILITY_AGENTLESS_ENABLED'))
let shouldInit = !isFalse(getResolvedEnv('DD_CIVISIBILITY_ENABLED'))
const isAgentlessEnabled = isTrue(getResolvedEnv('DD_CIVISIBILITY_AGENTLESS_ENABLED'))

if (!isTestWorker && isPackageManager()) {
log.debug('dd-trace is not initialized in a package manager.')
Expand All @@ -58,7 +59,7 @@ if (isTestWorker) {
}
} else {
if (isAgentlessEnabled) {
if (getEnvironmentVariable('DD_API_KEY')) {
if (getResolvedEnv('DD_API_KEY')) {
baseOptions.experimental = {
exporter: 'datadog'
}
Expand Down
10 changes: 3 additions & 7 deletions packages/datadog-instrumentations/src/helpers/register.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,10 @@ const log = require('../../../dd-trace/src/log')
const checkRequireCache = require('./check-require-cache')
const telemetry = require('../../../dd-trace/src/guardrails/telemetry')
const { isInServerlessEnvironment } = require('../../../dd-trace/src/serverless')
const { getEnvironmentVariables } = require('../../../dd-trace/src/config-helper')
const { getResolvedEnv } = require('../../../dd-trace/src/config-env-sources')

const envs = getEnvironmentVariables()

const {
DD_TRACE_DISABLED_INSTRUMENTATIONS = '',
DD_TRACE_DEBUG = ''
} = envs
const DD_TRACE_DISABLED_INSTRUMENTATIONS = getResolvedEnv('DD_TRACE_DISABLED_INSTRUMENTATIONS') || ''
const DD_TRACE_DEBUG = getResolvedEnv('DD_TRACE_DEBUG') || ''

const hooks = require('./hooks')
const instrumentations = require('./instrumentations')
Expand Down
8 changes: 4 additions & 4 deletions packages/datadog-instrumentations/src/otel-sdk-trace.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
const { addHook } = require('./helpers/instrument')
const shimmer = require('../../datadog-shimmer')
const tracer = require('../../dd-trace')
const { getEnvironmentVariable } = require('../../dd-trace/src/config-helper')
const { getResolvedEnv } = require('../../dd-trace/src/config-env-sources')

const otelSdkEnabled = getEnvironmentVariable('DD_TRACE_OTEL_ENABLED') ||
getEnvironmentVariable('OTEL_SDK_DISABLED')
? !getEnvironmentVariable('OTEL_SDK_DISABLED')
const otelSdkEnabled = getResolvedEnv('DD_TRACE_OTEL_ENABLED') ||
getResolvedEnv('OTEL_SDK_DISABLED')
? !getResolvedEnv('OTEL_SDK_DISABLED')
: undefined

if (otelSdkEnabled) {
Expand Down
6 changes: 4 additions & 2 deletions packages/datadog-plugin-aws-sdk/src/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const { storage } = require('../../datadog-core')
const { isTrue } = require('../../dd-trace/src/util')
const { tagsFromRequest, tagsFromResponse } = require('../../dd-trace/src/payload-tagging')
const { getEnvironmentVariable } = require('../../dd-trace/src/config-helper')
const { getResolvedEnv } = require('../../dd-trace/src/config-env-sources')

class BaseAwsSdkPlugin extends ClientPlugin {
static id = 'aws'
Expand Down Expand Up @@ -190,7 +191,7 @@ class BaseAwsSdkPlugin extends ClientPlugin {

isEnabled (request) {
const serviceId = this.serviceIdentifier.toUpperCase()
const envVarValue = getEnvironmentVariable(`DD_TRACE_AWS_SDK_${serviceId}_ENABLED`)
const envVarValue = getEnvironmentVariable(`DD_TRACE_AWS_SDK_${serviceId}_ENABLED`) // I'm not sure about this one
return envVarValue ? isTrue(envVarValue) : true
}

Expand Down Expand Up @@ -273,9 +274,10 @@ function normalizeConfig (config, serviceIdentifier) {
const serviceId = serviceIdentifier.toUpperCase()
const batchPropagationEnabled = isTrue(
specificConfig.batchPropagationEnabled ??
// Or this one
getEnvironmentVariable(`DD_TRACE_AWS_SDK_${serviceId}_BATCH_PROPAGATION_ENABLED`) ??
config.batchPropagationEnabled ??
getEnvironmentVariable('DD_TRACE_AWS_SDK_BATCH_PROPAGATION_ENABLED')
getResolvedEnv('DD_TRACE_AWS_SDK_BATCH_PROPAGATION_ENABLED')
)

// Merge the specific config back into the main config
Expand Down
4 changes: 2 additions & 2 deletions packages/datadog-plugin-azure-event-hubs/src/producer.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

const { getEnvironmentVariable } = require('../../dd-trace/src/config-helper')
const { getResolvedEnv } = require('../../dd-trace/src/config-env-sources')
const ProducerPlugin = require('../../dd-trace/src/plugins/producer')

class AzureEventHubsProducerPlugin extends ProducerPlugin {
Expand Down Expand Up @@ -75,7 +75,7 @@ function injectTraceContext (tracer, span, event) {
}

function batchLinksAreEnabled () {
const eh = getEnvironmentVariable('DD_TRACE_AZURE_EVENTHUBS_BATCH_LINKS_ENABLED')
const eh = getResolvedEnv('DD_TRACE_AZURE_EVENTHUBS_BATCH_LINKS_ENABLED')
return eh !== 'false'
}

Expand Down
4 changes: 2 additions & 2 deletions packages/datadog-plugin-azure-service-bus/src/producer.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

const { getEnvironmentVariable } = require('../../dd-trace/src/config-helper')
const { getResolvedEnv } = require('../../dd-trace/src/config-env-sources')
const ProducerPlugin = require('../../dd-trace/src/plugins/producer')
const spanContexts = new WeakMap()

Expand Down Expand Up @@ -86,7 +86,7 @@ function injectTraceContext (tracer, span, msg) {
}

function batchLinksAreEnabled () {
const sb = getEnvironmentVariable('DD_TRACE_AZURE_SERVICEBUS_BATCH_LINKS_ENABLED')
const sb = getResolvedEnv('DD_TRACE_AZURE_SERVICEBUS_BATCH_LINKS_ENABLED')
return sb !== 'false'
}

Expand Down
3 changes: 2 additions & 1 deletion packages/datadog-plugin-cucumber/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
const CiPlugin = require('../../dd-trace/src/plugins/ci_plugin')
const { storage } = require('../../datadog-core')
const { getEnvironmentVariable } = require('../../dd-trace/src/config-helper')
const { getResolvedEnv } = require('../../dd-trace/src/config-env-sources')

const {
TEST_SKIP_REASON,
Expand Down Expand Up @@ -112,7 +113,7 @@ class CucumberPlugin extends CiPlugin {
finishAllTraceSpans(this.testSessionSpan)
this.telemetry.count(TELEMETRY_TEST_SESSION, {
provider: this.ciProviderName,
autoInjected: !!getEnvironmentVariable('DD_CIVISIBILITY_AUTO_INSTRUMENTATION_PROVIDER')
autoInjected: !!getResolvedEnv('DD_CIVISIBILITY_AUTO_INSTRUMENTATION_PROVIDER')
})

this.libraryConfig = null
Expand Down
4 changes: 2 additions & 2 deletions packages/datadog-plugin-cypress/src/cypress-plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const {
} = require('../../dd-trace/src/plugins/util/test')
const { isMarkedAsUnskippable } = require('../../datadog-plugin-jest/src/util')
const { ORIGIN_KEY, COMPONENT } = require('../../dd-trace/src/constants')
const { getEnvironmentVariable } = require('../../dd-trace/src/config-helper')
const { getResolvedEnv } = require('../../dd-trace/src/config-env-sources')
const { appClosing: appClosingTelemetry } = require('../../dd-trace/src/telemetry')
const log = require('../../dd-trace/src/log')

Expand Down Expand Up @@ -644,7 +644,7 @@ class CypressPlugin {
this.ciVisEvent(TELEMETRY_EVENT_FINISHED, 'session')
incrementCountMetric(TELEMETRY_TEST_SESSION, {
provider: this.ciProviderName,
autoInjected: !!getEnvironmentVariable('DD_CIVISIBILITY_AUTO_INSTRUMENTATION_PROVIDER')
autoInjected: !!getResolvedEnv('DD_CIVISIBILITY_AUTO_INSTRUMENTATION_PROVIDER')
})

finishAllTraceSpans(this.testSessionSpan)
Expand Down
4 changes: 2 additions & 2 deletions packages/datadog-plugin-dd-trace-api/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
const Plugin = require('../../dd-trace/src/plugins/plugin')
const telemetryMetrics = require('../../dd-trace/src/telemetry/metrics')
const apiMetrics = telemetryMetrics.manager.namespace('tracers')
const { getEnvironmentVariable } = require('../../dd-trace/src/config-helper')
const { getResolvedEnv } = require('../../dd-trace/src/config-env-sources')

// api ==> here
const objectMap = new WeakMap()

const injectionEnabledTag =
`injection_enabled:${getEnvironmentVariable('DD_INJECTION_ENABLED') ? 'yes' : 'no'}`
`injection_enabled:${getResolvedEnv('DD_INJECTION_ENABLED') ? 'yes' : 'no'}`

module.exports = class DdTraceApiPlugin extends Plugin {
static id = 'dd-trace-api'
Expand Down
3 changes: 2 additions & 1 deletion packages/datadog-plugin-jest/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
const CiPlugin = require('../../dd-trace/src/plugins/ci_plugin')
const { storage } = require('../../datadog-core')
const { getEnvironmentVariable } = require('../../dd-trace/src/config-helper')
const { getResolvedEnv } = require('../../dd-trace/src/config-env-sources')

const {
TEST_STATUS,
Expand Down Expand Up @@ -161,7 +162,7 @@ class JestPlugin extends CiPlugin {

this.telemetry.count(TELEMETRY_TEST_SESSION, {
provider: this.ciProviderName,
autoInjected: !!getEnvironmentVariable('DD_CIVISIBILITY_AUTO_INSTRUMENTATION_PROVIDER')
autoInjected: !!getResolvedEnv('DD_CIVISIBILITY_AUTO_INSTRUMENTATION_PROVIDER')
})

this.tracer._exporter.flush(() => {
Expand Down
4 changes: 2 additions & 2 deletions packages/datadog-plugin-mocha/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const CiPlugin = require('../../dd-trace/src/plugins/ci_plugin')
const { storage } = require('../../datadog-core')
const { getEnvironmentVariable } = require('../../dd-trace/src/config-helper')
const { getResolvedEnv } = require('../../dd-trace/src/config-env-sources')

const {
TEST_STATUS,
Expand Down Expand Up @@ -406,7 +406,7 @@ class MochaPlugin extends CiPlugin {
finishAllTraceSpans(this.testSessionSpan)
this.telemetry.count(TELEMETRY_TEST_SESSION, {
provider: this.ciProviderName,
autoInjected: !!getEnvironmentVariable('DD_CIVISIBILITY_AUTO_INSTRUMENTATION_PROVIDER')
autoInjected: !!getResolvedEnv('DD_CIVISIBILITY_AUTO_INSTRUMENTATION_PROVIDER')
})
}
this.libraryConfig = null
Expand Down
4 changes: 2 additions & 2 deletions packages/datadog-plugin-mongodb-core/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const { isTrue } = require('../../dd-trace/src/util')
const DatabasePlugin = require('../../dd-trace/src/plugins/database')
const { getEnvironmentVariable } = require('../../dd-trace/src/config-helper')
const { getResolvedEnv } = require('../../dd-trace/src/config-env-sources')

class MongodbCorePlugin extends DatabasePlugin {
static id = 'mongodb-core'
Expand All @@ -20,7 +20,7 @@ class MongodbCorePlugin extends DatabasePlugin {
configure (config) {
super.configure(config)

const heartbeatFromEnv = getEnvironmentVariable('DD_TRACE_MONGODB_HEARTBEAT_ENABLED')
const heartbeatFromEnv = getResolvedEnv('DD_TRACE_MONGODB_HEARTBEAT_ENABLED')

this.config.heartbeatEnabled = config.heartbeatEnabled ??
(heartbeatFromEnv && isTrue(heartbeatFromEnv)) ??
Expand Down
6 changes: 3 additions & 3 deletions packages/datadog-plugin-playwright/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const { storage } = require('../../datadog-core')
const id = require('../../dd-trace/src/id')
const CiPlugin = require('../../dd-trace/src/plugins/ci_plugin')
const { getEnvironmentVariable } = require('../../dd-trace/src/config-helper')
const { getResolvedEnv } = require('../../dd-trace/src/config-env-sources')

const {
TEST_STATUS,
Expand Down Expand Up @@ -106,7 +106,7 @@ class PlaywrightPlugin extends CiPlugin {
finishAllTraceSpans(this.testSessionSpan)
this.telemetry.count(TELEMETRY_TEST_SESSION, {
provider: this.ciProviderName,
autoInjected: !!getEnvironmentVariable('DD_CIVISIBILITY_AUTO_INSTRUMENTATION_PROVIDER')
autoInjected: !!getResolvedEnv('DD_CIVISIBILITY_AUTO_INSTRUMENTATION_PROVIDER')
})
appClosingTelemetry()
this.tracer._exporter.flush(onDone)
Expand Down Expand Up @@ -393,7 +393,7 @@ class PlaywrightPlugin extends CiPlugin {
span.finish()

finishAllTraceSpans(span)
if (getEnvironmentVariable('DD_PLAYWRIGHT_WORKER')) {
if (getResolvedEnv('DD_PLAYWRIGHT_WORKER')) {
this.tracer._exporter.flush(onDone)
}
})
Expand Down
10 changes: 5 additions & 5 deletions packages/datadog-plugin-vitest/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

const CiPlugin = require('../../dd-trace/src/plugins/ci_plugin')
const { storage } = require('../../datadog-core')
const { getEnvironmentVariable } = require('../../dd-trace/src/config-helper')
const { getResolvedEnv } = require('../../dd-trace/src/config-env-sources')

const {
TEST_STATUS,
Expand Down Expand Up @@ -281,11 +281,11 @@ class VitestPlugin extends CiPlugin {
this.addBind('ci:vitest:test-suite:start', (ctx) => {
const { testSuiteAbsolutePath, frameworkVersion } = ctx

this.command = getEnvironmentVariable('DD_CIVISIBILITY_TEST_COMMAND')
this.command = getResolvedEnv('DD_CIVISIBILITY_TEST_COMMAND')
this.frameworkVersion = frameworkVersion
const testSessionSpanContext = this.tracer.extract('text_map', {
'x-datadog-trace-id': getEnvironmentVariable('DD_CIVISIBILITY_TEST_SESSION_ID'),
'x-datadog-parent-id': getEnvironmentVariable('DD_CIVISIBILITY_TEST_MODULE_ID')
'x-datadog-trace-id': getResolvedEnv('DD_CIVISIBILITY_TEST_SESSION_ID'),
'x-datadog-parent-id': getResolvedEnv('DD_CIVISIBILITY_TEST_MODULE_ID')
})

const trimmedCommand = DD_MAJOR < 6 ? this.command : 'vitest run'
Expand Down Expand Up @@ -405,7 +405,7 @@ class VitestPlugin extends CiPlugin {
finishAllTraceSpans(this.testSessionSpan)
this.telemetry.count(TELEMETRY_TEST_SESSION, {
provider: this.ciProviderName,
autoInjected: !!getEnvironmentVariable('DD_CIVISIBILITY_AUTO_INSTRUMENTATION_PROVIDER')
autoInjected: !!getResolvedEnv('DD_CIVISIBILITY_AUTO_INSTRUMENTATION_PROVIDER')
})
this.tracer._exporter.flush(onFinish)
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const request = require('../../exporters/common/request')
const id = require('../../id')
const log = require('../../log')
const { getEnvironmentVariable } = require('../../config-helper')
const { getResolvedEnv } = require('../../config-env-sources')

const {
incrementCountMetric,
Expand Down Expand Up @@ -51,7 +51,7 @@ function getKnownTests ({
options.path = `${evpProxyPrefix}/api/v2/ci/libraries/tests`
options.headers['X-Datadog-EVP-Subdomain'] = 'api'
} else {
const apiKey = getEnvironmentVariable('DD_API_KEY')
const apiKey = getResolvedEnv('DD_API_KEY')
if (!apiKey) {
return done(new Error('Known tests were not fetched because Datadog API key is not defined.'))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
const request = require('../../../exporters/common/request')
const log = require('../../../log')
const { safeJSONStringify } = require('../../../exporters/common/util')
const { getEnvironmentVariable } = require('../../../config-helper')
const { getResolvedEnv } = require('../../../config-env-sources')

const { CoverageCIVisibilityEncoder } = require('../../../encode/coverage-ci-visibility')
const BaseWriter = require('../../../exporters/common/writer')
Expand All @@ -29,7 +29,7 @@ class Writer extends BaseWriter {
path: '/api/v2/citestcov',
method: 'POST',
headers: {
'dd-api-key': getEnvironmentVariable('DD_API_KEY'),
'dd-api-key': getResolvedEnv('DD_API_KEY'),
...form.getHeaders()
},
timeout: 15_000,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const request = require('../../../exporters/common/request')
const log = require('../../../log')
const { safeJSONStringify } = require('../../../exporters/common/util')
const { JSONEncoder } = require('../../encode/json-encoder')
const { getEnvironmentVariable } = require('../../../config-helper')
const { getResolvedEnv } = require('../../../config-env-sources')

const BaseWriter = require('../../../exporters/common/writer')

Expand All @@ -24,7 +24,7 @@ class DynamicInstrumentationLogsWriter extends BaseWriter {
path: '/api/v2/logs',
method: 'POST',
headers: {
'dd-api-key': getEnvironmentVariable('DD_API_KEY'),
'dd-api-key': getResolvedEnv('DD_API_KEY'),
'Content-Type': 'application/json'
},
// TODO: what's a good value for timeout for the logs intake?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
const request = require('../../../exporters/common/request')
const { safeJSONStringify } = require('../../../exporters/common/util')
const log = require('../../../log')
const { getEnvironmentVariable } = require('../../../config-helper')
const { getResolvedEnv } = require('../../../config-env-sources')

const { AgentlessCiVisibilityEncoder } = require('../../../encode/agentless-ci-visibility')
const BaseWriter = require('../../../exporters/common/writer')
Expand Down Expand Up @@ -30,7 +30,7 @@ class Writer extends BaseWriter {
path: '/api/v2/citestcycle',
method: 'POST',
headers: {
'dd-api-key': getEnvironmentVariable('DD_API_KEY'),
'dd-api-key': getResolvedEnv('DD_API_KEY'),
'Content-Type': 'application/msgpack'
},
timeout: 15_000,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const path = require('path')

const FormData = require('../../../exporters/common/form-data')
const request = require('../../../exporters/common/request')
const { getEnvironmentVariable } = require('../../../config-helper')
const { getResolvedEnv } = require('../../../config-env-sources')

const log = require('../../../log')
const { isFalse } = require('../../../util')
Expand Down Expand Up @@ -51,7 +51,7 @@ function getCommonRequestOptions (url) {
return {
method: 'POST',
headers: {
'dd-api-key': getEnvironmentVariable('DD_API_KEY')
'dd-api-key': getResolvedEnv('DD_API_KEY')
},
timeout: 15_000,
url
Expand Down Expand Up @@ -288,7 +288,7 @@ function sendGitMetadata (url, { isEvpProxy, evpProxyPrefix }, configRepositoryU
}
// Otherwise we unshallow and get commits to upload again
log.debug('It is shallow clone, unshallowing...')
if (!isFalse(getEnvironmentVariable('DD_CIVISIBILITY_GIT_UNSHALLOW_ENABLED'))) {
if (!isFalse(getResolvedEnv('DD_CIVISIBILITY_GIT_UNSHALLOW_ENABLED'))) {
unshallowRepository(false)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ function getInterprocessTraceCode () {
if (getEnvironmentVariable('DD_PLAYWRIGHT_WORKER')) {
return PLAYWRIGHT_WORKER_TRACE_PAYLOAD_CODE
}
Comment on lines 26 to 28
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what this env var does

// ??
if (getEnvironmentVariable('TINYPOOL_WORKER_ID')) {
return VITEST_WORKER_TRACE_PAYLOAD_CODE
}
Expand Down
Loading
Loading